Skip to content

Cache Playwright browsers in CI#102

Merged
kraftbj merged 1 commit intotrunkfrom
cache-playwright-browsers
Mar 16, 2026
Merged

Cache Playwright browsers in CI#102
kraftbj merged 1 commit intotrunkfrom
cache-playwright-browsers

Conversation

@kraftbj
Copy link
Collaborator

@kraftbj kraftbj commented Mar 16, 2026

Summary

  • Caches ~/.cache/ms-playwright in the e2e-tests job, keyed on runner.os + Playwright version
  • Skips browser download on cache hit; only installs OS system libraries (playwright install-deps chromium)
  • Reduces CI time and network usage for repeated runs at the same Playwright version

Test plan

  • Verify e2e-tests job passes on the first run (cold cache, browsers downloaded)
  • Verify e2e-tests job passes on a second run (warm cache, browser download skipped, system deps installed)
  • Confirm cache key updates when Playwright version changes

Avoids re-downloading Chromium on every run by caching
~/.cache/ms-playwright keyed on the Playwright version.
On cache hit, only the OS-level system libraries are installed.
@kraftbj kraftbj merged commit b7b95b9 into trunk Mar 16, 2026
7 checks passed
@kraftbj kraftbj deleted the cache-playwright-browsers branch March 16, 2026 23:38
@kraftbj kraftbj added this to the 2.0.2 milestone Mar 16, 2026
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