Skip to content

Commit 70199e9

Browse files
committed
Merge branch 'dev/woopmnt-5249-e2e-ensure-version-coverage-for-woocommerce-and-php' into dev/woopmnt-5251-e2e-investigate-and-re-enable-woocommerce-blocks-e2e-tests
2 parents 530a068 + 89fc601 commit 70199e9

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

.github/actions/e2e/run-log-tests/action.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ runs:
1010
shell: /bin/bash +e {0}
1111
run: |
1212
npm run test:e2e-ci
13-
1413
if [[ -f "$E2E_RESULT_FILEPATH" ]]; then
1514
E2E_NUM_FAILED_TEST_SUITES=$(cat "$E2E_RESULT_FILEPATH" | jq '.stats["unexpected"]')
1615
echo "FIRST_RUN_FAILED_TEST_SUITES=$(echo $E2E_NUM_FAILED_TEST_SUITES)" >> $GITHUB_OUTPUT
@@ -29,7 +28,14 @@ runs:
2928
shell: bash
3029
# Filter failed E2E files from the result JSON file, and re-run them.
3130
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
3339
3440
# Archive screenshots if any
3541
- name: Archive e2e test screenshots & logs

tests/e2e/playwright.config.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,7 @@ export default defineConfig( {
6464
fullyParallel: false,
6565
/* Fail the build on CI if you accidentally left test.only in the source code. */
6666
forbidOnly: !! process.env.CI,
67-
/* Retry on CI only */
68-
retries: process.env.CI ? 2 : 0,
67+
retries: 0,
6968
/* Opt out of parallel tests. */
7069
workers: 1,
7170
/* Reporters to use. See https://playwright.dev/docs/test-reporters */

0 commit comments

Comments
 (0)