Skip to content

Commit

Permalink
chore(ci): Retain and upload traces on e2e-tests failures (#13562)
Browse files Browse the repository at this point in the history
  • Loading branch information
andreiborza authored Sep 3, 2024
1 parent d5f9f9d commit 2393064
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1003,6 +1003,15 @@ jobs:
working-directory: dev-packages/e2e-tests/test-applications/${{ matrix.test-application }}
timeout-minutes: 5
run: pnpm test:assert

- name: Upload Playwright Traces
uses: actions/upload-artifact@v4
if: failure()
with:
name: playwright-traces-job_e2e_playwright_tests-${{ matrix.test-application}}
path: dev-packages/e2e-tests/test-applications/${{ matrix.test-application}}/test-results
overwrite: true
retention-days: 7

job_optional_e2e_tests:
name: E2E ${{ matrix.label || matrix.test-application }} Test
Expand Down
2 changes: 1 addition & 1 deletion dev-packages/test-utils/src/playwright-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export function getPlaywrightConfig(
baseURL: `http://localhost:${appPort}`,

/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
trace: 'on-first-retry',
trace: 'retain-on-failure',
},

/* Configure projects for major browsers */
Expand Down

0 comments on commit 2393064

Please sign in to comment.