Your CI config, ready to paste
GitHub Actions with 10 shards.
name: Playwright Tests
on:
pull_request:
push:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
shard: ["1/10", "2/10", "3/10", "4/10", "5/10", "6/10", "7/10", "8/10", "9/10", "10/10"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- run: npm ci
- run: npx playwright install --with-deps
- run: npx playwright test --shard=${{ matrix.shard }}Concurrent jobs: 20 Free, 40 Pro, 60 Team, 500 Enterprise. Matrix max 256. Pricing and limits from GitHub Actions official docs.
How this works?
How the calculator turns your inputs into a shard count and a cost estimate.
- 1
Time on one machine
We multiply your test count by the average test duration. 500 tests at 8 seconds each take about 67 minutes on a single machine.
- 2
Per-shard time, with real overhead
Each shard pays a fixed setup cost (checkout, install, browsers) on top of its test time. We also add 25% because file-based splitting leaves the slowest shard heavier than the average.
- 3
Queue waves
Shards run in waves when there are more shards than parallel jobs your plan allows. We show a safe estimate (waves back-to-back) and a best case (waves overlap). Real time lands between them.
- 4
What it costs
Cost is shards × each shard's minutes × your per-minute rate, using official provider rates. GitHub rounds each job up to the whole minute. Monthly cost multiplies by your runs per day across 20 working days.
More free tools for Playwright teams
FAQs
No. Playwright sharding uses a single flag: --shard=X/N. Your tests, fixtures, and playwright.config.ts stay the same. The CI config is the only thing that changes.