]> git.ipfire.org Git - thirdparty/vuejs/create-vue.git/commitdiff
ci: only cache binaries when necessary
authorHaoqun Jiang <haoqunjiang@gmail.com>
Fri, 12 May 2023 15:30:52 +0000 (23:30 +0800)
committerHaoqun Jiang <haoqunjiang@gmail.com>
Fri, 12 May 2023 15:30:52 +0000 (23:30 +0800)
I find many of the CI minutes are wasted on unnecessary caching

.github/workflows/ci.yml

index 7ff80b2817d15800c8f5eecff32a3b76ac589c66..620d83d3c9b32c3fe1a8156c18bccc2fb3cdf2e3 100644 (file)
@@ -131,7 +131,8 @@ jobs:
           echo "PLAYWRIGHT_BROWSERS_PATH=$HOME\.cache\playwright-bin" >> $env:GITHUB_ENV
           echo "CYPRESS_CACHE_FOLDER=$HOME\.cache\cypress-bin" >> $env:GITHUB_ENV
 
-      - name: Cache Cypress binaries
+      - if: ${{ contains(matrix.flag-for-e2e, '--cypress') }}
+        name: Cache Cypress binaries
         id: cache-cypress
         uses: actions/cache@v3
         with:
@@ -139,7 +140,8 @@ jobs:
           key: ${{ runner.os }}-cypress-bin
           path: ${{ env.CYPRESS_CACHE_FOLDER }}
 
-      - name: Cache Playwright's binary
+      - if: ${{ contains(matrix.flag-for-e2e, '--playwright') }}
+        name: Cache Playwright's binary
         uses: actions/cache@v3
         with:
           # Playwright removes unused browsers automatically