Skip to content

Commit e049958

Browse files
committed
fixup: cache test nod mods too
1 parent 385c6bd commit e049958

File tree

1 file changed

+20
-10
lines changed

1 file changed

+20
-10
lines changed

.github/workflows/build.yaml

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,16 @@ jobs:
4444
id: cache-root-node-mods
4545
uses: actions/cache@v3
4646
with:
47-
path: "node_modules"
48-
key: yarn-build-${{ hashFiles('yarn.lock') }}
47+
path: |
48+
node_modules
49+
test/node_modules
50+
key: yarn-build-${{ hashFiles('yarn.lock', 'test/yarn.lock') }}
4951
restore-keys: |
5052
yarn-build-
5153
5254
- name: Install dependencies
5355
if: steps.cache-root-node-mods.outputs.cache-hit != 'true'
54-
run: SKIP_SUBMODULE_DEPS=1 yarn --frozen-lockfile
56+
run: yarn --frozen-lockfile
5557

5658
- name: Run yarn fmt
5759
run: yarn fmt
@@ -107,8 +109,10 @@ jobs:
107109
id: cache-root-node-mods
108110
uses: actions/cache@v3
109111
with:
110-
path: "node_modules"
111-
key: yarn-build-${{ hashFiles('yarn.lock') }}
112+
path: |
113+
node_modules
114+
test/node_modules
115+
key: yarn-build-${{ hashFiles('yarn.lock', 'test/yarn.lock') }}
112116
restore-keys: |
113117
yarn-build-
114118
@@ -278,8 +282,9 @@ jobs:
278282
- name: Build standalone release
279283
run: source scl_source enable devtoolset-9 && yarn release:standalone
280284

285+
# TODO@jsjoeio - can we use cache here?
281286
- name: Install test dependencies
282-
run: SKIP_SUBMODULE_DEPS=1 yarn install
287+
run: SKIP_SUBMODULE_DEPS=1 yarn --frozen-lockfile
283288

284289
- name: Run integration tests on standalone release
285290
run: yarn test:integration
@@ -414,6 +419,7 @@ jobs:
414419
- name: Build standalone release
415420
run: yarn release:standalone
416421

422+
# TODO@jsjoeio - can we cache here?
417423
- name: Install test dependencies
418424
run: SKIP_SUBMODULE_DEPS=1 yarn install
419425

@@ -453,8 +459,10 @@ jobs:
453459
id: cache-root-node-mods
454460
uses: actions/cache@v3
455461
with:
456-
path: "node_modules"
457-
key: yarn-build-${{ hashFiles('yarn.lock') }}
462+
path: |
463+
node_modules
464+
test/node_modules
465+
key: yarn-build-${{ hashFiles('yarn.lock', 'test/yarn.lock') }}
458466
restore-keys: |
459467
yarn-build-
460468
@@ -516,8 +524,10 @@ jobs:
516524
id: cache-root-node-mods
517525
uses: actions/cache@v3
518526
with:
519-
path: "node_modules"
520-
key: yarn-build-${{ hashFiles('yarn.lock') }}
527+
path: |
528+
node_modules
529+
test/node_modules
530+
key: yarn-build-${{ hashFiles('yarn.lock', 'test/yarn.lock') }}
521531
restore-keys: |
522532
yarn-build-
523533

0 commit comments

Comments
 (0)