Skip to content

Commit a9d8a44

Browse files
fix: remove count new tests
1 parent 3ce8001 commit a9d8a44

File tree

1 file changed

+3
-35
lines changed

1 file changed

+3
-35
lines changed

β€Ž.github/workflows/quality.ymlβ€Ž

Lines changed: 3 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -221,34 +221,6 @@ jobs:
221221
name: playwright-artifacts
222222
path: playwright-artifacts
223223

224-
- name: Count new tests
225-
id: count_tests
226-
run: |
227-
git fetch origin main:main
228-
new_tests=0
229-
230-
# Get list of changed test files
231-
for file in $(git diff --name-only main...HEAD | grep -E '^tests/suites/.*\.(spec|test)\.(ts|tsx|js|jsx)$'); do
232-
# Count tests in current version
233-
if git show HEAD:"$file" > /dev/null 2>&1; then
234-
current_tests=$(git show HEAD:"$file" | grep -E "test\([\'\"]" | wc -l)
235-
else
236-
current_tests=0
237-
fi
238-
239-
# Count tests in main version
240-
if git show main:"$file" > /dev/null 2>&1; then
241-
base_tests=$(git show main:"$file" | grep -E "test\([\'\"]" | wc -l)
242-
else
243-
base_tests=0
244-
fi
245-
246-
# Add difference to total
247-
((new_tests += current_tests - base_tests))
248-
done
249-
250-
echo "new_tests=$new_tests" >> $GITHUB_OUTPUT
251-
252224
- name: Update PR description
253225
uses: actions/github-script@v6
254226
with:
@@ -293,17 +265,14 @@ jobs:
293265
parseFloat(percent) > 0 ? 'πŸ”Ί' :
294266
parseFloat(percent) < 0 ? 'πŸ”½' : 'βœ…';
295267
296-
const newTests = parseInt('${{ steps.count_tests.outputs.new_tests }}');
297-
const testsStatus = newTests > 0 ? '✨' : 'βž–';
298-
299268
const ciSection = `## CI Results
300269
301270
### Test Status: <span style="color: ${statusColor};">${status}</span>
302271
πŸ“Š [Full Report](${reportUrl})
303272
304-
| Total | Passed | Failed | Flaky | Skipped | New Tests |
305-
|:-----:|:------:|:------:|:-----:|:-------:|:---------:|
306-
| ${testResults.total} | ${testResults.passed} | ${testResults.failed} | ${testResults.flaky} | ${testResults.skipped} | ${testsStatus} ${newTests} |
273+
| Total | Passed | Failed | Flaky | Skipped |
274+
|:-----:|:------:|:------:|:-----:|:-------:|
275+
| ${testResults.total} | ${testResults.passed} | ${testResults.failed} | ${testResults.flaky} | ${testResults.skipped} |
307276
308277
### Bundle Size: ${bundleStatus}
309278
Current: ${formatSize(currentSize)} | Main: ${formatSize(mainSize)}
@@ -322,7 +291,6 @@ jobs:
322291
- Bundle size is measured for the entire 'dist' directory.
323292
- πŸ“Š indicates links to detailed reports.
324293
- πŸ”Ί indicates increase, πŸ”½ decrease, and βœ… no change in bundle size.
325-
- ${testsStatus} indicates ${newTests} new test cases added in this PR.
326294
</details>`;
327295
328296
const { data: pullRequest } = await github.rest.pulls.get({

0 commit comments

Comments
Β (0)