chore(actions): cache all workspaces node_modules

This commit is contained in:
Clark Du 2020-11-04 14:14:46 +00:00
parent 8a25a91b60
commit 20822be26c
2 changed files with 21 additions and 2 deletions

View File

@ -38,7 +38,10 @@ jobs:
id: node_modules_cache_id
uses: actions/cache@v2
with:
path: node_modules
path: |
node_modules
packages/*/node_modules
distributions/*/node_modules
key: ${{ matrix.os }}-node-v${{ matrix.node }}-deps-${{ hashFiles(format('{0}{1}', github.workspace, '/yarn.lock')) }}
- name: install
@ -50,6 +53,7 @@ jobs:
path: |
node_modules
packages/*/node_modules
distributions/*/node_modules
packages/*/dist
key: ${{ matrix.os }}-node-v${{ matrix.node }}-nuxt-${{ github.sha }}
@ -75,6 +79,7 @@ jobs:
path: |
node_modules
packages/*/node_modules
distributions/*/node_modules
packages/*/dist
key: ${{ matrix.os }}-node-v${{ matrix.node }}-nuxt-${{ github.sha }}
@ -107,6 +112,7 @@ jobs:
path: |
node_modules
packages/*/node_modules
distributions/*/node_modules
packages/*/dist
key: ${{ matrix.os }}-node-v${{ matrix.node }}-nuxt-${{ github.sha }}
@ -137,6 +143,7 @@ jobs:
path: |
node_modules
packages/*/node_modules
distributions/*/node_modules
packages/*/dist
key: ${{ matrix.os }}-node-v${{ matrix.node }}-nuxt-${{ github.sha }}
@ -177,6 +184,7 @@ jobs:
path: |
node_modules
packages/*/node_modules
distributions/*/node_modules
packages/*/dist
key: ${{ matrix.os }}-node-v${{ matrix.node }}-nuxt-${{ github.sha }}
@ -212,6 +220,7 @@ jobs:
path: |
node_modules
packages/*/node_modules
distributions/*/node_modules
packages/*/dist
key: ${{ matrix.os }}-node-v${{ matrix.node }}-nuxt-${{ github.sha }}
@ -248,6 +257,7 @@ jobs:
path: |
node_modules
packages/*/node_modules
distributions/*/node_modules
packages/*/dist
key: ${{ matrix.os }}-node-v${{ matrix.node }}-nuxt-${{ github.sha }}
@ -284,6 +294,7 @@ jobs:
path: |
node_modules
packages/*/node_modules
distributions/*/node_modules
packages/*/dist
key: ${{ matrix.os }}-node-v${{ matrix.node }}-nuxt-${{ github.sha }}
@ -312,6 +323,7 @@ jobs:
path: |
node_modules
packages/*/node_modules
distributions/*/node_modules
packages/*/dist
key: ${{ matrix.os }}-node-v${{ matrix.node }}-nuxt-${{ github.sha }}

View File

@ -32,7 +32,10 @@ jobs:
id: node_modules_cache_id
uses: actions/cache@v2
with:
path: node_modules
path: |
node_modules
packages/*/node_modules
distributions/*/node_modules
key: ${{ matrix.os }}-node-v${{ matrix.node }}-deps-${{ hashFiles(format('{0}{1}', github.workspace, '/yarn.lock')) }}
- name: install
@ -44,6 +47,7 @@ jobs:
path: |
node_modules
packages/*/node_modules
distributions/*/node_modules
packages/*/dist
key: ${{ matrix.os }}-node-v${{ matrix.node }}-nuxt-${{ github.sha }}
@ -73,6 +77,7 @@ jobs:
path: |
node_modules
packages/*/node_modules
distributions/*/node_modules
packages/*/dist
key: ${{ matrix.os }}-node-v${{ matrix.node }}-nuxt-${{ github.sha }}
@ -106,6 +111,7 @@ jobs:
path: |
node_modules
packages/*/node_modules
distributions/*/node_modules
packages/*/dist
key: ${{ matrix.os }}-node-v${{ matrix.node }}-nuxt-${{ github.sha }}
@ -144,6 +150,7 @@ jobs:
path: |
node_modules
packages/*/node_modules
distributions/*/node_modules
packages/*/dist
key: ${{ matrix.os }}-node-v${{ matrix.node }}-nuxt-${{ github.sha }}