[ci] Skip Playwright system deps install on subsequent self-hosted runs#92893
Merged
Conversation
Contributor
Tests Passed |
f956173 to
f15c734
Compare
Contributor
Stats from current PR✅ No significant changes detected📊 All Metrics📖 Metrics GlossaryDev Server Metrics:
Build Metrics:
Change Thresholds:
⚡ Dev Server
📦 Dev Server (Webpack) (Legacy)📦 Dev Server (Webpack)
⚡ Production Builds
📦 Production Builds (Webpack) (Legacy)📦 Production Builds (Webpack)
📦 Bundle SizesBundle Sizes⚡ TurbopackClient Main Bundles
Server Middleware
Build DetailsBuild Manifests
📦 WebpackClient Main Bundles
Polyfills
Pages
Server Edge SSR
Middleware
Build DetailsBuild Manifests
Build Cache
🔄 Shared (bundler-independent)Runtimes
📎 Tarball URL |
f15c734 to
eb977e2
Compare
eb977e2 to
84f6c0b
Compare
On self-hosted runners, the system dependencies installed by playwright install --with-deps persist between runs. Use a stamp file (~/.cache/playwright-deps-installed) to skip the slow apt-get on subsequent runs, falling back to just downloading browser binaries if their version changed.
84f6c0b to
5961ddc
Compare
ztanner
approved these changes
Apr 16, 2026
This was referenced Apr 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Use a stamp file to skip
playwright install --with-depsafter the first successful run on a self-hosted runner.Why
--with-depsrunssudo apt-get installfor Playwright's system dependencies every time, even when they're already installed. On self-hosted runners this takes ~10s of no-opapt-getchecking. After the first install, subsequent runs only needplaywright install(which downloads browser binaries if the version changed, and is instant when cached).The assumption is that on most of the runners,
playwrightwill be the same version on each, and the deps that are installed are compatible within each version.Most of the time this step is ~3s, when everything is healthy and up-to-date.
Occasionally these steps will hiccup on builds when we're already really got these deps installed so this chops a little bit off each one. This also helps when APT mirrors go down.
How
playwright install --with-deps+ write~/.cache/playwright-deps-installedplaywright installwithout--with-deps