From e6572344ca0c98fb45469d7f59293d8b6097135b Mon Sep 17 00:00:00 2001 From: Lukas Bockstaller Date: Mon, 31 Aug 2026 12:52:06 +0200 Subject: [PATCH] CI: add tracing for e2e tests during failure (#6491) * collect and upload traces on failure * include deps for pw install --- .github/workflows/tests.yml | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a1c1ba297..69a80dcc3 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -123,7 +123,24 @@ jobs: working-directory: ./src run: make all compress - name: Install Playwright browsers - run: playwright install + run: playwright install --with-deps - name: Run E2E tests working-directory: ./src - run: PRETIX_CONFIG_FILE=tests/ci_postgres.cfg py.test tests/e2e/ -v --maxfail=10 + run: PRETIX_CONFIG_FILE=tests/ci_postgres.cfg py.test tests/e2e/ -v --maxfail=10 --tracing=retain-on-failure + - uses: actions/upload-artifact@v4 + if: ${{ !cancelled() }} + with: + name: playwright-traces + path: test-results/ + - name: Log trace instructions + if: steps.check-traces.outputs.found == 'true' + run: | + { + echo "## 🎭 Playwright traces available" + echo "" + echo "Some tests failed or retried and produced traces." + echo "" + echo "1. Download the **playwright-traces-${{ github.run_id }}** artifact from this run (link in the **Summary** tab, under Artifacts)." + echo "2. Unzip it." + echo "3. Go to https://trace.playwright.dev and drag \`trace.zip\` into the page — or run \`npx playwright show-trace trace.zip\` locally." + } >> "$GITHUB_STEP_SUMMARY"