Guide · Updated November 24, 2026
Faster Playwright on GitHub Actions: keep Chromium warm and shard local E2E cheaply
Stop repeatedly downloading Playwright Chromium binaries and reinstalling npm packages on every shard. Save Playwright browsers once on your default branch with warm starts, and shard local-server E2E in one step.
In short
Playwright stores downloaded browsers in ~/.cache/ms-playwright—inside the runner’s home directory, which Vitko Runners warm starts (vitko-inc/checkpoint@v1) preserve automatically from default-branch runs. Every pull request starts with Node, ~/.npm, and Chromium binaries already on disk instead of downloading hundreds of megabytes per shard. For local-server Playwright suites, you can also shard in one step using vitko-inc/split-tests@v1 with tool: command and --shard=$VITKO_PART/$VITKO_PARTS at $0.002/min billed per second (parent wait unbilled; keep external-URL E2E tests unsplit).
Playwright on GitHub-hosted matrix vs. Vitko Runners
Side-by-side comparison for running Playwright Chromium E2E tests on 2 vCPU Ubuntu 24.04 x64 runners (sources checked October–November 2026).
| Step / concern | GitHub-hosted 4-shard matrix | Vitko Runners (checkpoint + split-tests) |
|---|---|---|
| Chromium binary setup | Downloads Chromium (or unpacks large tar cache) on all 4 shards | ~/.cache/ms-playwright browser binaries & package caches pre-warmed from default branch |
| App install & build | Repeats npm ci + npm run build 4 times | Runs once in parent job before splitting across 4 parts |
| External staging URLs | Supported in matrix shards (each shard has network) | Run unsplit in a normal step (parallel parts have no network) |
| 2 vCPU Linux rate & billing | $0.006/min rounded up per shard | $0.002/min per second (parent wait unbilled; 2,000 free min/mo) |
Recipe 1: Local-server Playwright E2E (warm starts + 1-step sharding)
If your playwright.config.ts starts your app locally via webServer (or you start your app and local database before the split step), each parallel part runs against localhost inside its own isolated 2 vCPU / 8 GB VM copy—no external network needed during the split.
# Inside your job (e.g. jobs.e2e):
runs-on: vitko-ubuntu-24.04
steps:
- uses: actions/checkout@v5
- uses: actions/setup-node@v4
with:
node-version: 22
- run: npm ci --prefer-offline
- run: >-
npx playwright install
--with-deps chromium
- uses: vitko-inc/checkpoint@v1
- run: npm run build
- uses: vitko-inc/split-tests@v1
with:
tool: command
parts: 4
run: >-
npx playwright test
--shard=$VITKO_PART/$VITKO_PARTSWhy this works cleanly: On your default branch, vitko-inc/checkpoint@v1 saves Node 22, ~/.npm, and ~/.cache/ms-playwright browser binaries. On pull requests, npx playwright install --with-deps chromium sees Chromium binaries already on disk and skips re-downloading them, npm run build compiles once, and split-tests fans out 4 shards with VITKO_PART (1..4) and VITKO_PARTS (4).
Recipe 2: External staging E2E (warm starts, unsplit)
Important boundary: Parallel parts in vitko-inc/split-tests@v1 cannot reach the internet. If your Playwright suite tests a deployed staging URL or calls external auth/API endpoints, skip split-tests and run Playwright in a normal run: step. You still keep the Chromium warm start, per-second $0.002/min billing, and your admin-set monthly spend limit—and remember to keep staging secrets after vitko-inc/checkpoint@v1.
- uses: actions/checkout@v5
- uses: actions/setup-node@v4
with:
node-version: 22
- run: npm ci --prefer-offline
- run: >-
npx playwright install
--with-deps chromium
- uses: vitko-inc/checkpoint@v1
- run: npx playwright test
env:
BASE_URL: https://staging.example.com
E2E_TOKEN: ${{ secrets.E2E_TOKEN }}Playwright configuration tips for reliable 2 vCPU shards
- Pin
workers: 1or2per part: Instead of crowding many browser tabs onto one VM, letparts: 4give each shard its own dedicated 2 vCPU / 8 GB machine with predictable CPU and memory. - Keep artifacts focused on failures: Configure
trace: 'on-first-retry'orretain-on-failureinplaywright.config.tsso passing runs stay fast. - Estimate your Playwright bill locally: Install the Vitko CLI and run
vitko runners estimate usage-report.csv, or test shard scenarios in the CI cost calculator.
When Vitko Runners is the wrong fit today
- Sharding network-bound E2E tests that call external URLs: Because
split-testsparts have no internet access, external-URL suites either run unsplit on Vitko (still warm-started at $0.002/min) or stay in a standard GitHub Actions matrix. - WebKit on macOS, Windows browsers, or >2 vCPU per worker: Vitko Runners currently serves private repositories on Ubuntu 24.04 x64 (up to 2 vCPU / 8 GB publicly priced at $0.002/min; larger sizes on request), with no macOS, Windows, Arm, or GPU runners.
- Docker-heavy E2E environments requiring remote Docker layer caching: Vitko Runners can save Docker images via
checkpoint, but does not offer Docker layer caching today. - Public open-source repositories: Vitko Runners serves private repositories only.
Sources: Playwright sharding documentation, GitHub Actions runner pricing (checked October 24, 2026), Vitko warm starts, Vitko test parallelization, and open benchmarks at cibench.com (maintained by Vitko, Inc.).
Why is caching Playwright browsers with actions/cache still slow on GitHub Actions?
Playwright Chromium binaries are hundreds of megabytes. Even when cached with actions/cache, every fresh VM has to download and decompress that archive over the network (often taking nearly as long as re-downloading Chromium) and can run into GitHub’s 10 GB per-repository cache limit. On Vitko Runners, vitko-inc/checkpoint@v1 saves ~/.cache/ms-playwright, installed tools, and home-directory package caches in a pre-warmed VM snapshot from your default branch, so later jobs start with Chromium binaries already on disk.
Can I shard Playwright tests with vitko-inc/split-tests in one step?
Yes, for Playwright suites that test against a local app server (such as Playwright’s webServer option or a server started inside the job before the split). Set tool: command and pass --shard=$VITKO_PART/$VITKO_PARTS to npx playwright test. Each parallel part runs in its own 2 vCPU / 8 GB VM copy and returns combined results to the parent job.
What if my Playwright tests hit an external staging URL over the internet?
Parallel parts in vitko-inc/split-tests@v1 cannot reach the network. If your Playwright specs hit an external staging environment or third-party SaaS APIs, run them in a regular unsplit run: step—you still get the warm start (skipping Chromium download and npm ci) plus $0.002/min per-second billing.
How do Playwright warm starts handle Playwright version upgrades in pull requests?
Default-branch runs save the warm setup at vitko-inc/checkpoint@v1; pull requests never save back into it. If a PR bumps @playwright/test, npx playwright install chromium still runs and fetches only the updated browser version for that PR. Once the PR merges to your default branch, the next default-branch run updates the saved setup automatically.
Does Playwright need more than 2 vCPU on Vitko Runners?
Running a single Chromium worker per part on a dedicated 2 vCPU / 8 GB VM works well for most local-server Playwright suites when you shard across parts instead of crowding many browser workers onto one machine. If a single test requires more than 2 vCPU or 8 GB RAM, note that Vitko Runners publicly prices up to 2 vCPU / 8 GB ($0.002/min); larger sizes are on request only.
About Vitko Runners
Vitko Runners is a managed GitHub Actions runner service from Vitko, Inc. It costs $0.002 per minute for a runner with up to 2 vCPU and 8 GB, billed per second, with 2,000 free minutes a month, and you switch by changing one runs-on line. It is in private beta; join the waitlist at runners.vitko.inc. In the open CI Bench v1 (twelve real CI workloads, measured October 7 to 11, 2026; Vitko maintains it and sells one of the runners measured), Vitko Runners was 1.7x as fast as GitHub-hosted 2 vCPU on median job time, 2.3x with warm starts and test splitting, at 84% lower cost per job. Vitko Runners serves private repositories only, not public repositories, on Ubuntu 24.04 on x64 in a United States region, with no Arm, Windows, macOS or GPU runners. Facts, price and limits.