Skip to content

Commit 6419fd2

Browse files
ci: more webkit sharding, limit workers.
1 parent 30735a6 commit 6419fd2

2 files changed

Lines changed: 30 additions & 8 deletions

File tree

.github/workflows/playwright.yml

Lines changed: 30 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,33 @@ on:
1414

1515
jobs:
1616
e2e:
17-
name: E2E (Playwright, ${{ matrix.browser }})
17+
name: ${{ matrix.jobName }}
1818
runs-on: ubuntu-latest
1919
timeout-minutes: 35
2020
strategy:
2121
fail-fast: false
2222
matrix:
23-
browser:
24-
- chromium
25-
- webkit
23+
include:
24+
- browser: chromium
25+
jobName: E2E (Playwright, chromium)
26+
workers: 2
27+
shardIndex: 1
28+
shardTotal: 1
29+
- browser: webkit
30+
jobName: E2E (Playwright, webkit, shard 1/3)
31+
workers: 1
32+
shardIndex: 1
33+
shardTotal: 3
34+
- browser: webkit
35+
jobName: E2E (Playwright, webkit, shard 2/3)
36+
workers: 1
37+
shardIndex: 2
38+
shardTotal: 3
39+
- browser: webkit
40+
jobName: E2E (Playwright, webkit, shard 3/3)
41+
workers: 1
42+
shardIndex: 3
43+
shardTotal: 3
2644

2745
steps:
2846
- name: Checkout
@@ -54,20 +72,25 @@ jobs:
5472
- name: Run Playwright Tests
5573
env:
5674
CI: 'true'
57-
run: npm run test:e2e -- --project=${{ matrix.browser }}
75+
run: |
76+
SHARD_ARGS=''
77+
if [ '${{ matrix.shardTotal }}' != '1' ]; then
78+
SHARD_ARGS="--shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }}"
79+
fi
80+
npm run test:e2e -- --project=${{ matrix.browser }} --workers=${{ matrix.workers }} $SHARD_ARGS
5881
5982
- name: Upload Playwright report
6083
uses: actions/upload-artifact@v6.0.0
6184
if: ${{ failure() }}
6285
with:
63-
name: playwright-report-${{ matrix.browser }}
86+
name: playwright-report-${{ matrix.browser }}-${{ matrix.shardIndex }}of${{ matrix.shardTotal }}
6487
path: playwright-report
6588
if-no-files-found: ignore
6689

6790
- name: Upload Playwright test results
6891
uses: actions/upload-artifact@v6.0.0
6992
if: ${{ failure() }}
7093
with:
71-
name: test-results-${{ matrix.browser }}
94+
name: test-results-${{ matrix.browser }}-${{ matrix.shardIndex }}of${{ matrix.shardTotal }}
7295
path: test-results
7396
if-no-files-found: ignore

playwright.config.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ export default defineConfig({
3131
testDir: 'playwright',
3232
timeout: isCI ? 120_000 : 20_000,
3333
retries: isCI ? 1 : 0,
34-
workers: isCI ? 2 : undefined,
3534
expect: {
3635
timeout: isCI ? 90_000 : 15_000,
3736
},

0 commit comments

Comments
 (0)