Skip to content

Visualize Your Ideas With Code

build: cache node_modules per action run (#885)

Jacobe6cd5be99173
diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml
index 34c0e55e..7cc9e1eb 100644
--- a/.github/workflows/verify.yml
+++ b/.github/workflows/verify.yml
@@ -6,7 +6,6 @@ on:
env:
HUSKY: 0
- TSP_SKIP_CACHE: 'true'
jobs:
prepare:
@@ -20,15 +19,13 @@ jobs:
with:
node-version: 18
cache: npm
- - uses: actions/cache@v3
- id: cache-npm
+ - run: npm ci
+ - uses: actions/cache/save@v3
with:
- key: ${{ hashFiles('package-lock.json') }}-node-modules
+ key: ${{ github.run_id }}-node-modules
path: |
**/node_modules
~/.cache/puppeteer
- - run: npm ci
- if: steps.cache-npm.outputs.cache-hit != 'true'
commit:
name: Commit name
needs: prepare
@@ -43,7 +40,7 @@ jobs:
cache: npm
- uses: actions/cache/restore@v3
with:
- key: ${{ hashFiles('package-lock.json') }}-node-modules
+ key: ${{ github.run_id }}-node-modules
path: |
**/node_modules
~/.cache/puppeteer
@@ -60,7 +57,7 @@ jobs:
cache: npm
- uses: actions/cache/restore@v3
with:
- key: ${{ hashFiles('package-lock.json') }}-node-modules
+ key: ${{ github.run_id }}-node-modules
path: |
**/node_modules
~/.cache/puppeteer
@@ -77,7 +74,7 @@ jobs:
cache: npm
- uses: actions/cache/restore@v3
with:
- key: ${{ hashFiles('package-lock.json') }}-node-modules
+ key: ${{ github.run_id }}-node-modules
path: |
**/node_modules
~/.cache/puppeteer
@@ -94,7 +91,7 @@ jobs:
cache: npm
- uses: actions/cache/restore@v3
with:
- key: ${{ hashFiles('package-lock.json') }}-node-modules
+ key: ${{ github.run_id }}-node-modules
path: |
**/node_modules
~/.cache/puppeteer
@@ -121,7 +118,7 @@ jobs:
cache: npm
- uses: actions/cache/restore@v3
with:
- key: ${{ hashFiles('package-lock.json') }}-node-modules
+ key: ${{ github.run_id }}-node-modules
path: |
**/node_modules
~/.cache/puppeteer
@@ -148,7 +145,7 @@ jobs:
cache: npm
- uses: actions/cache/restore@v3
with:
- key: ${{ hashFiles('package-lock.json') }}-node-modules
+ key: ${{ github.run_id }}-node-modules
path: |
**/node_modules
~/.cache/puppeteer
@@ -175,7 +172,7 @@ jobs:
cache: npm
- uses: actions/cache/restore@v3
with:
- key: ${{ hashFiles('package-lock.json') }}-node-modules
+ key: ${{ github.run_id }}-node-modules
path: |
**/node_modules
~/.cache/puppeteer
@@ -202,7 +199,7 @@ jobs:
cache: npm
- uses: actions/cache/restore@v3
with:
- key: ${{ hashFiles('package-lock.json') }}-node-modules
+ key: ${{ github.run_id }}-node-modules
path: |
**/node_modules
~/.cache/puppeteer