ci(e2e): ensure Cypress binary is installed before running tests#2958
Draft
dokterbob wants to merge 2 commits into
Draft
ci(e2e): ensure Cypress binary is installed before running tests#2958dokterbob wants to merge 2 commits into
dokterbob wants to merge 2 commits into
Conversation
Add an explicit `pnpm exec cypress install` step after `pnpm-node-install` in the E2E workflow. When the pnpm-store cache hits but the `.cypress-cache` misses (as exposed by the windows-latest → windows-2025 runner migration), pnpm skips re-running the Cypress postinstall script and the binary is never downloaded. The new step is idempotent — a no-op when the binary is already present — and decouples binary presence from pnpm postinstall behaviour. Fixes #2957 Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
c4d1aec to
d6a9ea8
Compare
Windows Defender's real-time protection quarantines Cypress.exe synchronously on write, so both the pnpm postinstall and the explicit cypress install step exit 0 yet the binary is absent seconds later. Adding an MpPreference exclusion for CYPRESS_CACHE_FOLDER before any download step prevents the quarantine and lets the binary persist. Fixes #2957 Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
|
This PR is stale because it has been open for 14 days with no activity. |
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
pnpm exec cypress installstep to thee2e-testsjob, betweenpnpm-node-installanduv-python-install.windows-latest→windows-2025runner migration.CYPRESS_CACHE_FOLDERit prints "Cypress … already installed" and exits 0; when it's missing it downloads and installs it.Root cause
CYPRESS_CACHE_FOLDERis backed by a separateactions/cacheentry keyed onpnpm-lock.yaml. The pnpm store (restored bysetup-node'scache: pnpm) caches the package contents but pnpm skips re-running a dependency's postinstall script when it considers the package already built — so when the pnpm-store cache hits but the.cypress-cachemisses, the Cypress binary is never downloaded. Ubuntu masked this through more-reliable cache hits; the new Windows runner exposed it reliably.Test plan
.cypress-cachemiss (e.g. clear the Actions cache or bumppnpm-lock.yaml) and confirm the new step downloads the binary successfully.Closes #2957
🤖 Generated with Claude Code
Summary by cubic
Ensure the Cypress binary is present in E2E CI and prevent Windows Defender from quarantining it. Fixes missing binary errors on Windows (
windows-2025) by adding an explicit install and a Defender exclusion.pnpm exec cypress installafterpnpm-node-install; idempotent and decouples binary presence from pnpm postinstall/cache mismatches.CYPRESS_CACHE_FOLDERfrom Windows Defender before cache/installation to stopCypress.exefrom being quarantined.Written for commit 787ed8f. Summary will update on new commits.