File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed
.github/actions/e2e/run-log-tests Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change 10
10
shell : /bin/bash +e {0}
11
11
run : |
12
12
npm run test:e2e-ci
13
-
14
13
if [[ -f "$E2E_RESULT_FILEPATH" ]]; then
15
14
E2E_NUM_FAILED_TEST_SUITES=$(cat "$E2E_RESULT_FILEPATH" | jq '.stats["unexpected"]')
16
15
echo "FIRST_RUN_FAILED_TEST_SUITES=$(echo $E2E_NUM_FAILED_TEST_SUITES)" >> $GITHUB_OUTPUT
29
28
shell : bash
30
29
# Filter failed E2E files from the result JSON file, and re-run them.
31
30
run : |
32
- 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
33
39
34
40
# Archive screenshots if any
35
41
- name : Archive e2e test screenshots & logs
Original file line number Diff line number Diff line change @@ -64,8 +64,7 @@ export default defineConfig( {
64
64
fullyParallel : false ,
65
65
/* Fail the build on CI if you accidentally left test.only in the source code. */
66
66
forbidOnly : ! ! process . env . CI ,
67
- /* Retry on CI only */
68
- retries : process . env . CI ? 2 : 0 ,
67
+ retries : 0 ,
69
68
/* Opt out of parallel tests. */
70
69
workers : 1 ,
71
70
/* Reporters to use. See https://playwright.dev/docs/test-reporters */
You can’t perform that action at this time.
0 commit comments