ci: run the e2e tests in four shards

One job ran all 300+ tests with one worker, about 20 minutes. Four
jobs at once take a quarter each, still with one worker per job.
This commit is contained in:
dayuan.jiang
2026-10-08 18:11:46 +09:00
parent 17ea4811fb
commit 74a40082f4
+9 -3
View File
@@ -43,8 +43,14 @@ jobs:
run: npm --prefix packages/mcp-server run build && npm --prefix packages/mcp-server run check-package
e2e:
name: E2E Tests
# Four jobs at once, each with a quarter of the tests and one worker:
# the same conditions per test, about a quarter of the time
name: E2E Tests (${{ matrix.shard }}/4)
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
shard: [1, 2, 3, 4]
steps:
- uses: actions/checkout@v6
@@ -76,7 +82,7 @@ jobs:
run: npm run build
- name: Run E2E tests
run: npm run test:e2e
run: npm run test:e2e -- --shard=${{ matrix.shard }}/4
env:
CI: true
@@ -84,6 +90,6 @@ jobs:
uses: actions/upload-artifact@v6
if: always()
with:
name: playwright-report
name: playwright-report-${{ matrix.shard }}
path: playwright-report/
retention-days: 7