Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 47 additions & 3 deletions .github/workflows/lintBuildTest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,15 @@ jobs:
- name: Build
run: npm run build
playwright:
name: Playwright (${{ matrix.browser }})
name: Playwright (${{ matrix.browser }}, shard ${{ matrix.shard }}/3)
timeout-minutes: 20
runs-on: macos-15-xlarge
needs: install
strategy:
fail-fast: false
matrix:
browser: ['chrome', 'firefox', 'safari']
shard: [1, 2, 3]
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
Expand Down Expand Up @@ -96,10 +97,53 @@ jobs:
if: steps.playwright-cache.outputs.cache-hit == 'true'
run: npx playwright install-deps
- name: Run Playwright browser tests
run: npx playwright test --project=${{matrix.browser}}
run: npx playwright test --project=${{matrix.browser}} --shard=${{matrix.shard}}/3
- uses: actions/upload-artifact@v7
if: always()
with:
name: test-results-${{ matrix.browser }}
name: test-results-${{ matrix.browser }}-shard-${{ matrix.shard }}
path: test-results/
retention-days: 7
# blob reports get merged into a single HTML report in playwright-result
- name: Upload blob report
uses: actions/upload-artifact@v7
if: ${{ !cancelled() }}
with:
name: blob-report-${{ matrix.browser }}-${{ matrix.shard }}
path: blob-report/
retention-days: 1
# Merges shard reports and serves as the single status check for branch protection
playwright-result:
name: Playwright
if: always()
needs: playwright
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: 22
cache: 'npm'
- run: npm ci
- name: Download blob reports
uses: actions/download-artifact@v8
with:
path: all-blob-reports
pattern: blob-report-*
merge-multiple: true
- name: Merge into HTML report
run: npx playwright merge-reports --reporter html ./all-blob-reports
- name: Upload merged HTML report
uses: actions/upload-artifact@v7
with:
name: playwright-report
path: playwright-report/
retention-days: 7
- name: Check shard results
run: |
if [ "${{ needs.playwright.result }}" = "success" ]; then
echo "All Playwright shards passed"
else
echo "Some Playwright shards failed: ${{ needs.playwright.result }}"
exit 1
fi
5 changes: 4 additions & 1 deletion playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ export default {
// Local runs also emit a compact plain-text failure report to .e2e-logs/
// (timestamped per run, last 10 kept) via test/e2e/compact-reporter.ts, so
// an LLM agent can read the failures.
reporter: process.env.CI ? 'list' : [['list'], ['./test/e2e/compact-reporter.ts']],
// blob reports from sharded CI runs get merged into one HTML report in CI
reporter: process.env.CI
? [['list'], ['blob']]
: [['list'], ['./test/e2e/compact-reporter.ts']],
use: {
trace: process.env.CI ? 'on-first-retry' : 'retain-on-failure',
baseURL: 'http://localhost:4009',
Expand Down
Loading