]> git.ipfire.org Git - thirdparty/vuejs/create-vue.git/commitdiff
fix: force install cypress binary on cache miss
authorHaoqun Jiang <haoqunjiang@gmail.com>
Tue, 28 Feb 2023 11:53:21 +0000 (19:53 +0800)
committerHaoqun Jiang <haoqunjiang@gmail.com>
Tue, 28 Feb 2023 11:53:21 +0000 (19:53 +0800)
.github/workflows/ci.yml

index 1598b2f4a26647f40cc995237fab4c918465b2db..0558ffea6f8b99ad86b620c6e2093256d606084e 100644 (file)
@@ -130,6 +130,7 @@ jobs:
           echo "CYPRESS_CACHE_FOLDER=$HOME\.cache\cypress-bin" >> $env:GITHUB_ENV
 
       - name: Cache Cypress binaries
+        id: cache-cypress
         uses: actions/cache@v3
         with:
           key: ${{ runner.os }}-cypress-bin
@@ -145,18 +146,17 @@ jobs:
 
       - if: ${{ (contains(env.FEATURE_FLAGS, '--')) }}
         name: Create the sample project with feature flags
-        run: node ./outfile.cjs sample-project ${{ env.FEATURE_FLAGS }}
+        working-directory: ../
+        run: node ./create-vue/outfile.cjs sample-project ${{ env.FEATURE_FLAGS }}
 
       - if: ${{ !(contains(env.FEATURE_FLAGS, '--')) }}
         name: Create the sample project with default options
-        run: node ./outfile.cjs sample-project --default
-
-      - name: Move the sample project to the upper-level directory
-        run: mv sample-project ../sample-project
+        working-directory: ../
+        run: node ./create-vue/outfile.cjs sample-project --default
 
       - name: Install dependencies in the sample project
         working-directory: ../sample-project
-        run: pnpm install --no-frozen-lockfile
+        run: pnpm install
 
       - if: ${{ contains(matrix.flag-for-vitest, '--') }}
         name: Run unit test script
@@ -167,6 +167,10 @@ jobs:
         working-directory: ../sample-project
         run: pnpm build
 
+      - name: Force download Cypress on cache miss
+        if: steps.cache-cypress.outputs.cache-hit != 'true'
+        working-directory: ../sample-project
+        run: pnpm exec cypress install --force
 
       - if: ${{ contains(matrix.flag-for-e2e, '--playwright') }}
         name: Install Playwright dependencies