Skip to content

Commit

Permalink
update to use blob reports
Browse files Browse the repository at this point in the history
  • Loading branch information
esizer committed Dec 19, 2024
1 parent d265a48 commit b53007d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 26 deletions.
33 changes: 8 additions & 25 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,31 +77,14 @@ jobs:
- name: Install Playwright Browsers
run: npx playwright install chromium webkit --with-deps

- name: Run Chromium Tests
run: pnpm run e2e:playwright:chromium --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }}
- name: Run Tests
run: pnpm run e2e:playwright --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }}
- uses: actions/upload-artifact@v4
if: always()
with:
name: report-chromium-${{ matrix.shardIndex }}
name: blob-report-${{ matrix.shardIndex }}
path: ./apps/playwright/playwright-report/
retention-days: 30

- name: Run Webkit Tests
run: pnpm run e2e:playwright:webkit --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }}
- uses: actions/upload-artifact@v4
if: always()
with:
name: report-webkit-${{ matrix.shardIndex }}
path: ./apps/playwright/playwright-report/
retention-days: 30

- name: Check status of containers
if: failure()
run: docker compose ps

- name: "Check logs: web server container"
if: failure()
run: docker compose logs webserver
retention-days: 1

merge-reports:
# Merge reports after playwright-tests, even if some shards have failed
Expand All @@ -127,16 +110,16 @@ jobs:
- name: Download blob reports from GitHub Actions Artifacts
uses: actions/download-artifact@v4
with:
path: ./all-reports
pattern: report-*
path: all-blob-reports
pattern: blob-report-*
merge-multiple: true

- name: Merge into HTML Report
run: npx playwright merge-reports --reporter html ./all-reports
run: npx playwright merge-reports --reporter html ./all-blob-reports

- name: Upload HTML report
uses: actions/upload-artifact@v4
with:
name: html-report--attempt-${{ github.run_attempt }}
path: ./playwright-report
path: playwright-report
retention-days: 14
2 changes: 1 addition & 1 deletion apps/playwright/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default defineConfig({
workers: process.env.CI ? 1 : "25%",
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
reporter: process.env.CI
? [["line"], ["html", { open: "never" }]]
? "blob"
: [["line"], ["html", { open: "on-failure" }]],
timeout: Number(process.env.TEST_TIMEOUT ?? 60 * 1000), // 1 minute
expect: { timeout: Number(process.env.EXPECT_TIMEOUT ?? 10000) }, // 10 seconds
Expand Down

0 comments on commit b53007d

Please sign in to comment.