Skip to content

Commit

Permalink
Merge the reports
Browse files Browse the repository at this point in the history
  • Loading branch information
w0rm committed Apr 1, 2024
1 parent 224e63c commit 5108da0
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 6 deletions.
26 changes: 23 additions & 3 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,28 @@ jobs:
run: npx playwright test --project=${{ matrix.project }} --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }}
working-directory: ./testing
- uses: actions/upload-artifact@v4
if: failure()
if: always()
with:
name: playwright-report-${{ matrix.project }}-${{ matrix.shardIndex }}
name: blob-report-${{ matrix.project }}-${{ matrix.shardIndex }}
path: testing/playwright-report/
retention-days: 30
retention-days: 1
merge-reports:
# Merge reports after test, even if some shards have failed
if: always()
needs: [test]
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v4
with:
node-version: "20"
- uses: actions/download-artifact@v4
with:
path: all-blob-reports
pattern: blob-report-*
merge-multiple: true
- run: npx playwright merge-reports --reporter html ./all-blob-reports
- uses: actions/upload-artifact@v4
with:
name: html-report--attempt-${{ github.run_attempt }}
path: playwright-report
retention-days: 14
6 changes: 3 additions & 3 deletions testing/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ export default defineConfig({
fullyParallel: true,
/* Fail the build on CI if you accidentally left test.only in the source code. */
forbidOnly: !!process.env.CI,
/* Retry on CI only */
retries: process.env.CI ? 2 : 0,
/* Do not retry the tests, the tests seem to be reliable */
retries: 0,
/* Opt out of parallel tests on CI. */
workers: process.env.CI ? 1 : undefined,
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
reporter: "html",
reporter: process.env.CI ? "blob" : "html",
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
use: {
/* Base URL to use in actions like `await page.goto('/')`. */
Expand Down

0 comments on commit 5108da0

Please sign in to comment.