Skip to content

Commit 4d56594

Browse files
ci: shard Playwright runs per browser project (#193)
The suite grew past what a single serial job can finish inside the 30-minute timeout — every recent run was killed at 30m and reported as cancelled. One matrix shard per Playwright project (Chrome, Firefox, WebKit, mobile Chromium) keeps each job well under the limit, installs only the browser it needs, and fails independently per engine.
1 parent ecf661a commit 4d56594

1 file changed

Lines changed: 22 additions & 4 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,27 @@ name: Drag and drop tests
22
on: [push, workflow_dispatch]
33
jobs:
44
playwright:
5-
name: "Playwright tests"
5+
name: "Playwright tests (${{ matrix.project }})"
66
timeout-minutes: 30
77
runs-on: ubuntu-latest
8+
strategy:
9+
# One shard per Playwright project: the full suite serially exceeds the
10+
# job timeout, and sharding keeps each run well inside it.
11+
fail-fast: false
12+
matrix:
13+
include:
14+
- project: Desktop Chrome
15+
browser: chromium
16+
slug: chrome
17+
- project: Desktop Firefox
18+
browser: firefox
19+
slug: firefox
20+
- project: Desktop Webkit
21+
browser: webkit
22+
slug: webkit
23+
- project: iPhone 13 Chromium
24+
browser: chromium
25+
slug: mobile-chromium
826
steps:
927
- uses: actions/checkout@v6
1028
- uses: actions/setup-node@v6
@@ -27,12 +45,12 @@ jobs:
2745
- name: Build Dev
2846
run: cd tests && pnpm install && cd ..
2947
- name: Install Playwright
30-
run: pnpm exec playwright install --with-deps
48+
run: pnpm exec playwright install --with-deps ${{ matrix.browser }}
3149
- name: Run Playwright tests
32-
run: pnpm exec playwright test
50+
run: pnpm exec playwright test --project "${{ matrix.project }}"
3351
- uses: actions/upload-artifact@v7
3452
if: always()
3553
with:
36-
name: playwright-report
54+
name: playwright-report-${{ matrix.slug }}
3755
path: playwright-report/
3856
retention-days: 30

0 commit comments

Comments
 (0)