chore: add caching only root node_modules

This commit is contained in:
Karol Sójko
2022-10-14 13:44:53 +02:00
parent 2000435ed5
commit 0738342cd6

View File

@@ -39,16 +39,15 @@ jobs:
with:
path: |
${{ steps.yarn-cache-dir-path.outputs.dir }}
./node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn install --immutable
- name: Build
if: steps.cache-build.outputs.cache-hit != 'true'
run: yarn build:all
lint:
@@ -87,6 +86,7 @@ jobs:
with:
path: |
${{ steps.yarn-cache-dir-path.outputs.dir }}
./node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
@@ -138,6 +138,7 @@ jobs:
with:
path: |
${{ steps.yarn-cache-dir-path.outputs.dir }}
./node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
@@ -189,6 +190,7 @@ jobs:
with:
path: |
${{ steps.yarn-cache-dir-path.outputs.dir }}
./node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
@@ -240,6 +242,7 @@ jobs:
with:
path: |
${{ steps.yarn-cache-dir-path.outputs.dir }}
./node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
@@ -315,6 +318,7 @@ jobs:
with:
path: |
${{ steps.yarn-cache-dir-path.outputs.dir }}
./node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-