Skip to content

Commit 50200d0

Browse files
balzssclaude
andcommitted
fix(ci): explicitly install Cypress binary before tests
Match the npm workflow structure where dependencies are installed first, then the cypress-io/github-action uses the already-installed Cypress. Root cause: pnpm install --frozen-lockfile was not triggering Cypress's postinstall script to download the binary (~100MB). The cypress/browsers Docker image does not include the Cypress binary pre-installed. Solution: 1. Run pnpm install --frozen-lockfile in regression-test 2. Explicitly run `pnpm exec cypress install` to force binary download 3. Use install: false in cypress-io/github-action (already installed) 4. Cache ~/.cache/Cypress using lockfile hash (from cypress-io/github-action#1138) 5. Remove CYPRESS_CACHE_FOLDER override - use image defaults This matches the npm workflow which runs `npm ci` (triggers postinstall), then uses the action with the pre-installed Cypress. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 1803a28 commit 50200d0

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

.github/workflows/visual-regression.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,19 @@ jobs:
2020
with:
2121
node-version: '22'
2222
cache: 'pnpm'
23+
- name: Cache Cypress binary
24+
uses: actions/cache@v4
25+
with:
26+
path: ~/.cache/Cypress
27+
key: ${{ runner.os }}-cypress-${{ hashFiles('regression-test/pnpm-lock.yaml') }}
2328
- name: Build InstUI
2429
run: pnpm install --frozen-lockfile && pnpm run bootstrap
2530
- name: Install regression-test dependencies
2631
run: pnpm install --frozen-lockfile
2732
working-directory: regression-test
33+
- name: Install Cypress binary
34+
run: pnpm exec cypress install
35+
working-directory: regression-test
2836
- name: Run Cypress tests
2937
uses: cypress-io/github-action@v6
3038
env:

0 commit comments

Comments
 (0)