Skip to content

ci(e2e): ensure Cypress binary is installed before running tests#2958

Draft
dokterbob wants to merge 2 commits into
mainfrom
go-to-cypress-its-nice
Draft

ci(e2e): ensure Cypress binary is installed before running tests#2958
dokterbob wants to merge 2 commits into
mainfrom
go-to-cypress-its-nice

Conversation

@dokterbob

@dokterbob dokterbob commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Adds an explicit pnpm exec cypress install step to the e2e-tests job, between pnpm-node-install and uv-python-install.
  • Fixes the "Cypress binary is missing" failure seen on Windows shards (CI: Windows e2e shards fail — Cypress binary missing on actions/cache miss (pnpm skips postinstall) #2957) caused by the windows-latestwindows-2025 runner migration.
  • The step is idempotent: when the binary is already present in CYPRESS_CACHE_FOLDER it prints "Cypress … already installed" and exits 0; when it's missing it downloads and installs it.

Root cause

CYPRESS_CACHE_FOLDER is backed by a separate actions/cache entry keyed on pnpm-lock.yaml. The pnpm store (restored by setup-node's cache: 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-cache misses, the Cypress binary is never downloaded. Ubuntu masked this through more-reliable cache hits; the new Windows runner exposed it reliably.

Test plan

  • Windows × shard matrix passes without "Cypress binary is missing" errors.
  • Ubuntu shards remain green (no regression).
  • Force a .cypress-cache miss (e.g. clear the Actions cache or bump pnpm-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.

  • Bug Fixes
    • Add pnpm exec cypress install after pnpm-node-install; idempotent and decouples binary presence from pnpm postinstall/cache mismatches.
    • On Windows, exclude CYPRESS_CACHE_FOLDER from Windows Defender before cache/installation to stop Cypress.exe from being quarantined.

Written for commit 787ed8f. Summary will update on new commits.

Review in cubic

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]>
@dokterbob dokterbob force-pushed the go-to-cypress-its-nice branch from c4d1aec to d6a9ea8 Compare June 11, 2026 16:54
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]>
@github-actions

Copy link
Copy Markdown

This PR is stale because it has been open for 14 days with no activity.

@github-actions github-actions Bot added the stale Issue has not had recent activity or appears to be solved. Stale issues will be automatically closed label Jun 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stale Issue has not had recent activity or appears to be solved. Stale issues will be automatically closed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI: Windows e2e shards fail — Cypress binary missing on actions/cache miss (pnpm skips postinstall)

1 participant