From 68276810ec7c8fa4f4f13fd58a06ab4150dd04e3 Mon Sep 17 00:00:00 2001 From: Steve Cliff Date: Fri, 8 May 2026 21:41:38 +0100 Subject: [PATCH] e2e: dump error-context.md to log on failure + bump upload-artifact MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Playwright run produces error-context.md per failed test with a full DOM snapshot — useful for triaging UI test failures without round-tripping through downloaded artifacts. Cat it into the workflow log on failure. Also bump actions/upload-artifact v3 → v4. v3 uploads still return success on this Gitea runner but the artifacts don't surface through the API or UI; v4 is the correct version per the workflow header note. --- .gitea/workflows/e2e.yml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/e2e.yml b/.gitea/workflows/e2e.yml index f8e9e54..4181ecc 100644 --- a/.gitea/workflows/e2e.yml +++ b/.gitea/workflows/e2e.yml @@ -96,6 +96,19 @@ jobs: docker cp e2e-pw:/work/playwright-report/. e2e/playwright/playwright-report/ || true docker cp e2e-pw:/work/test-results/. e2e/playwright/test-results/ || true + - name: Show Playwright failure context (on failure) + if: failure() + run: | + set +e + shopt -s nullglob globstar + for f in e2e/playwright/test-results/**/error-context.md; do + echo "::group::$f" + cat "$f" + echo "::endgroup::" + done + echo "Failure attachments (download via the playwright-report artifact):" + find e2e/playwright/test-results \( -name '*.png' -o -name '*.webm' -o -name 'trace.zip' \) -printf ' %p\n' | sort + - name: Compose logs (on failure) if: failure() run: | @@ -105,7 +118,7 @@ jobs: - name: Upload Playwright report (on failure) if: failure() - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: playwright-report path: |