Skip to content

Commit 52a1b63

Browse files
committed
fix: force install cypress binary on cache miss
1 parent cf736a0 commit 52a1b63

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

.github/workflows/ci.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ jobs:
130130
echo "CYPRESS_CACHE_FOLDER=$HOME\.cache\cypress-bin" >> $env:GITHUB_ENV
131131
132132
- name: Cache Cypress binaries
133+
id: cache-cypress
133134
uses: actions/cache@v3
134135
with:
135136
key: ${{ runner.os }}-cypress-bin
@@ -145,18 +146,17 @@ jobs:
145146

146147
- if: ${{ (contains(env.FEATURE_FLAGS, '--')) }}
147148
name: Create the sample project with feature flags
148-
run: node ./outfile.cjs sample-project ${{ env.FEATURE_FLAGS }}
149+
working-directory: ../
150+
run: node ./create-vue/outfile.cjs sample-project ${{ env.FEATURE_FLAGS }}
149151

150152
- if: ${{ !(contains(env.FEATURE_FLAGS, '--')) }}
151153
name: Create the sample project with default options
152-
run: node ./outfile.cjs sample-project --default
153-
154-
- name: Move the sample project to the upper-level directory
155-
run: mv sample-project ../sample-project
154+
working-directory: ../
155+
run: node ./create-vue/outfile.cjs sample-project --default
156156

157157
- name: Install dependencies in the sample project
158158
working-directory: ../sample-project
159-
run: pnpm install --no-frozen-lockfile
159+
run: pnpm install
160160

161161
- if: ${{ contains(matrix.flag-for-vitest, '--') }}
162162
name: Run unit test script
@@ -167,6 +167,10 @@ jobs:
167167
working-directory: ../sample-project
168168
run: pnpm build
169169

170+
- name: Force download Cypress on cache miss
171+
if: steps.cache-cypress.outputs.cache-hit != 'true'
172+
working-directory: ../sample-project
173+
run: pnpm exec cypress install --force
170174

171175
- if: ${{ contains(matrix.flag-for-e2e, '--playwright') }}
172176
name: Install Playwright dependencies

0 commit comments

Comments
 (0)