Problem
The components job of .github/workflows/test.yml runs npx playwright install --with-deps chromium on every run with no cache in front of it. The step is network-bound: it usually takes 20–40 s, but it depends on the browser CDN's mood, and today it did not cooperate twice.
Evidence (read from the Actions API, 2026-09-02)
- Job layout is already parallel: after a 5 s scope classification,
unit and components start within a second of each other (green run 33656222429: unit 16:39:15→16:40:28, components 16:39:16→16:44:58). Nothing was serialized by the split.
- A normal components job: checkout 10 s,
npm ci 10 s, Install Playwright Chromium 31 s, tests 4m38s — 5m42s in total. On dev, every green components job of the last two days ran between 3m24s and 4m52s.
- The two outliers: PR run 33655219941 spent 8m42s in the install step (tests 4m17s; 13m19s total), PR run 33645938633 spent 10m40s there (tests 3m57s; 15m05s total, green).
- Tail over the last 28 components jobs: install ≤ 40 s on most, 58 s / 1m10s / 1m30s on three, ≥ 2 minutes on the outliers above.
Proposed change
Cache the browser binaries and download only on a miss:
- resolve the installed Playwright version (
node -p "require('@playwright/test/package.json').version");
actions/cache@v4 on ~/.cache/ms-playwright, key playwright-chromium-${{ runner.os }}-<version>;
- on a cache miss run
npx playwright install --with-deps chromium as today; on a hit run npx playwright install-deps chromium only (the apt libraries are not part of the cache and stay cheap on the Azure mirrors).
The step stays scoped to matrix.suite == 'components'. No change to the test command, the scope classification, or the unit arm.
Acceptance criteria
- AC-1: on a cache hit the components job's browser step completes in under 20 s (cache restore plus a launch probe; apt runs only when the probe reports a missing library — measured: 6 s), read from the job's step timings on the PR's own run and the first
dev run after merge.
- AC-2: the first run after the Playwright version changes is a miss and installs as before (the key carries the version); the run is green.
- AC-3: the
unit job is untouched: no cache step, still parallel with components, same duration band (about 1m15s).
- AC-4: the components tests pass unchanged on the PR run (the cached browser is the same build the tests ran on before).
Test evidence
The PR's own workflow run (miss, then a re-run for the hit) plus the step timings of the first dev run after merge, pasted into the PR body.
Authored by Mnemosyne (@neo-fable, Claude Fable 5.1, Claude Code) · session 37bbc610-f0cd-4abb-95c2-eb70336a86f3
Problem
The
componentsjob of.github/workflows/test.ymlrunsnpx playwright install --with-deps chromiumon every run with no cache in front of it. The step is network-bound: it usually takes 20–40 s, but it depends on the browser CDN's mood, and today it did not cooperate twice.Evidence (read from the Actions API, 2026-09-02)
unitandcomponentsstart within a second of each other (green run 33656222429: unit 16:39:15→16:40:28, components 16:39:16→16:44:58). Nothing was serialized by the split.npm ci10 s, Install Playwright Chromium 31 s, tests 4m38s — 5m42s in total. Ondev, every green components job of the last two days ran between 3m24s and 4m52s.Proposed change
Cache the browser binaries and download only on a miss:
node -p "require('@playwright/test/package.json').version");actions/cache@v4on~/.cache/ms-playwright, keyplaywright-chromium-${{ runner.os }}-<version>;npx playwright install --with-deps chromiumas today; on a hit runnpx playwright install-deps chromiumonly (the apt libraries are not part of the cache and stay cheap on the Azure mirrors).The step stays scoped to
matrix.suite == 'components'. No change to the test command, the scope classification, or the unit arm.Acceptance criteria
devrun after merge.unitjob is untouched: no cache step, still parallel withcomponents, same duration band (about 1m15s).Test evidence
The PR's own workflow run (miss, then a re-run for the hit) plus the step timings of the first
devrun after merge, pasted into the PR body.Authored by Mnemosyne (@neo-fable, Claude Fable 5.1, Claude Code) · session 37bbc610-f0cd-4abb-95c2-eb70336a86f3