From e6afbb3a53f5145f03f6e324af21cca7fdec82b7 Mon Sep 17 00:00:00 2001 From: snomiao Date: Fri, 5 Dec 2025 21:13:23 +0000 Subject: [PATCH] [bugfix] Fix E2E test report generation for non-chromium browsers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixed an issue where Playwright HTML reports were not being generated for chromium-2x, chromium-0.5x, and mobile-chrome test runs, causing 404 errors when accessing report links in PR comments. The problem was that these browsers run very few tests (1-6 tests each), and when using --reporter=html --reporter=json together, Playwright would only generate the JSON report without the HTML assets. Changed the workflow to use the blob reporter followed by merge-reports (matching the approach used for sharded chromium tests), which ensures both HTML and JSON reports are always generated with complete assets. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .github/workflows/ci-tests-e2e.yaml | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci-tests-e2e.yaml b/.github/workflows/ci-tests-e2e.yaml index f4a7705745c..0363ec47a40 100644 --- a/.github/workflows/ci-tests-e2e.yaml +++ b/.github/workflows/ci-tests-e2e.yaml @@ -124,12 +124,19 @@ jobs: - name: Run Playwright tests (${{ matrix.browser }}) id: playwright run: | - # Run tests with both HTML and JSON reporters + # Run tests with blob reporter first + pnpm exec playwright test --project=${{ matrix.browser }} --reporter=blob + env: + PLAYWRIGHT_BLOB_OUTPUT_DIR: ./blob-report + + - name: Generate HTML and JSON reports + if: always() + run: | + # Generate HTML report from blob + pnpm exec playwright merge-reports --reporter=html ./blob-report + # Generate JSON report separately with explicit output path PLAYWRIGHT_JSON_OUTPUT_NAME=playwright-report/report.json \ - pnpm exec playwright test --project=${{ matrix.browser }} \ - --reporter=list \ - --reporter=html \ - --reporter=json + pnpm exec playwright merge-reports --reporter=json ./blob-report - name: Upload Playwright report uses: actions/upload-artifact@v4