CI: make Playwright install deterministic and cache browser downloads - #5788
Open
nicoburns wants to merge 2 commits into
Open
CI: make Playwright install deterministic and cache browser downloads#5788nicoburns wants to merge 2 commits into
nicoburns wants to merge 2 commits into
Conversation
Contributor
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Removes a source of nondeterminism from the two Playwright CI jobs ("Playwright | Windows" and "Playwright | ") and caches the browser downloads.
Both jobs ran
npm cifollowed bynpm install -D @playwright/test, which re-resolved@playwright/testto the newest version matching the^1.56.1range — silently overriding the lockfile, so every CI run could get a different Playwright runner + browser build. The straynpm installline is removed sonpm ci+ the lockfile fully determine the version, and@playwright/testis pinned exactly ("1.56.1", no caret) inpackages/playwright-tests/package.json(lockfile regenerated) so upgrades are explicit.Only Chromium is used (see
projectsinplaywright.config.js), sonpx playwright installbecomesnpx playwright install chromium(no--with-deps; the Linux job already installs system deps viacache-apt-pkgs-action).Adds an
actions/cache@v5step for the Playwright browser directory in both jobs, keyed onrunner.os+hashFiles('packages/playwright-tests/package-lock.json'):~\AppData\Local\ms-playwright~/.cache/ms-playwright/~/Library/Caches/ms-playwrightOn cache hit,
npx playwright install chromiumno-ops (it skips already-downloaded browsers).Verified locally:
npm ci && npx playwright install chromiumresolves 1.56.1 matching the lockfile. actionlint reports no new findings on the workflow (only preexisting warnings about custom warp runner labels and aSwatinem/rust-cacheinput).Link to Devin session: https://dioxus.staging.devinenterprise.com/sessions/266de4d3e2bd42208aed86ad92cce74d
Open in Devin Desktop: https://dioxus.staging.devinenterprise.com/desktop/session/266de4d3e2bd42208aed86ad92cce74d?variant=devin-insiders
Requested by: @nicoburns