Skip to content

ci: cache Playwright browsers for the story tests - #311

Merged
maksimzinchuk merged 1 commit into
mainfrom
ci/cache-playwright-browsers
Aug 19, 2026
Merged

ci: cache Playwright browsers for the story tests#311
maksimzinchuk merged 1 commit into
mainfrom
ci/cache-playwright-browsers

Conversation

@maksimzinchuk

Copy link
Copy Markdown
Collaborator

Problem

storybook-tests downloads Chromium from Playwright's CDN on every run, and nothing caches it. That download is usually fast and sometimes not. Measured on the Install Chromium step across recent runs:

Run Branch Duration
32144859867 fix/VCST-5671… 19 s
32150224146 main 20 s
32150499441 fix/VCST-5632… 22 s
32226928338 main 73 s
32227333537 main 33 s
32227535262 main 241 s
32225221895 VCST-5248 1379 s
32227555174 fix/VCST-5746… timed out at 25 min, still downloading

The job's timeout-minutes is 25. When the download is slow, the step eats the entire budget and the story tests never run — the check reports failure having tested nothing. That is what happened on #310, whose own diff was two ai-agent files.

Worth stating explicitly: this is not caused by #309 (checkout@v4→v7, setup-node@v4→v7). Those actions have nothing to do with browser downloads, and the fast/slow split straddles that merge — 33 s and 73 s runs landed on main after it. The variance is the CDN.

Change

Cache ~/.cache/ms-playwright, keyed on the resolved playwright version rather than a hash of yarn.lock. The browser revision only changes when playwright does, so an unrelated dependency bump should not throw the cache away.

System libraries live outside that directory, so they are installed either way:

  • cache miss → playwright install --with-deps chromium, as before
  • cache hit → playwright install-deps chromium, which is seconds

The existing comment about needing the workspace binary rather than yarn dlx is preserved — that constraint still holds.

Note on the first run

The first run after this merges still pays the download once, to populate the cache. If it happens to land during a slow CDN window it can still hit the 25-minute timeout; a re-run will then find the cache warm.

timeout-minutes is deliberately left at 25 — with the cache in place the step should be seconds, and raising the ceiling would just hide a future regression for longer.

The `Install Chromium` step downloads the browser from Playwright's CDN on
every run, with nothing caching it. That is usually fast and sometimes not:
observed 19-22s on several runs, then 241s, then 1379s, and one run sat on
it for over 20 minutes. The job's budget is 25 minutes, so a slow download
means the story tests never execute and the check fails having tested
nothing.

Caches `~/.cache/ms-playwright`, keyed on the resolved playwright version
rather than a hash of yarn.lock -- the browser revision only changes when
playwright does, so an unrelated dependency bump should not discard it.

System libraries live outside that directory and are installed either way.
On a cache hit only `install-deps` runs, which is seconds; on a miss the
full `install --with-deps` runs as before.

The first run after this lands still pays the download once, to populate
the cache.
@github-actions

Copy link
Copy Markdown

📦 Preview published for commit 5130191

Install the preview with dist-tag:

npm install @vc-shell/framework@pr-311

Or pin to the exact commit:

npm install @vc-shell/framework@2.4.0-pr311.5130191

Published packages (dist-tag pr-311, version 2.4.0-pr311.5130191):

  • @vc-shell/framework
  • @vc-shell/api-client-generator
  • @vc-shell/create-vc-app
  • @vc-shell/config-generator
  • @vc-shell/migrate
  • @vc-shell/ts-config
  • @vc-shell/mf-config
  • @vc-shell/mf-host
  • @vc-shell/mf-module
  • @vc-shell/vc-app-skill

@maksimzinchuk
maksimzinchuk merged commit 2964ccb into main Aug 19, 2026
10 checks passed
@maksimzinchuk
maksimzinchuk deleted the ci/cache-playwright-browsers branch August 19, 2026 10:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant