File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
.github/actions/e2e/run-log-tests Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 28
28
shell : bash
29
29
# Filter failed E2E files from the result JSON file, and re-run them.
30
30
run : |
31
- npm run test:e2e-ci $(cat $E2E_RESULT_FILEPATH | jq -r '[.suites[] | (if has("suites") then .suites[] | .specs[] else .specs[] end) | select(.tests[].status == "unexpected") | .file] | unique | .[]')
31
+ # Extract failed test files and run only those
32
+ FAILED_FILES=$(cat $E2E_RESULT_FILEPATH | jq -r '[.suites[] | (if has("suites") then .suites[] | .specs[] else .specs[] end) | select(.tests[].status == "unexpected") | .file] | unique | .[]')
33
+ if [[ -n "$FAILED_FILES" ]]; then
34
+ echo "Retrying failed test files: $FAILED_FILES"
35
+ npx playwright test --config=tests/e2e/playwright.config.ts --grep-invert @todo $FAILED_FILES
36
+ else
37
+ echo "No failed test files found to retry"
38
+ fi
32
39
33
40
# Archive screenshots if any
34
41
- name : Archive e2e test screenshots & logs
You can’t perform that action at this time.
0 commit comments