Skip to content

CI: make Playwright install deterministic and cache browser downloads - #5788

Open
nicoburns wants to merge 2 commits into
mainfrom
devin/1787832610-deterministic-playwright-ci
Open

CI: make Playwright install deterministic and cache browser downloads#5788
nicoburns wants to merge 2 commits into
mainfrom
devin/1787832610-deterministic-playwright-ci

Conversation

@nicoburns

Copy link
Copy Markdown
Member

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 ci followed by npm install -D @playwright/test, which re-resolved @playwright/test to the newest version matching the ^1.56.1 range — silently overriding the lockfile, so every CI run could get a different Playwright runner + browser build. The stray npm install line is removed so npm ci + the lockfile fully determine the version, and @playwright/test is pinned exactly ("1.56.1", no caret) in packages/playwright-tests/package.json (lockfile regenerated) so upgrades are explicit.

  • Only Chromium is used (see projects in playwright.config.js), so npx playwright install becomes npx playwright install chromium (no --with-deps; the Linux job already installs system deps via cache-apt-pkgs-action).

  • Adds an actions/cache@v5 step for the Playwright browser directory in both jobs, keyed on runner.os + hashFiles('packages/playwright-tests/package-lock.json'):

    • Windows: ~\AppData\Local\ms-playwright
    • Linux/macOS (matrix job): ~/.cache/ms-playwright / ~/Library/Caches/ms-playwright

    On cache hit, npx playwright install chromium no-ops (it skips already-downloaded browsers).

Verified locally: npm ci && npx playwright install chromium resolves 1.56.1 matching the lockfile. actionlint reports no new findings on the workflow (only preexisting warnings about custom warp runner labels and a Swatinem/rust-cache input).

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

@staging-devin-ai-integration

Copy link
Copy Markdown
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR that start with 'DevinAI' or '@devin'.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

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