Skip to content

Commit 733dac4

Browse files
committed
feat: add node caching to platform jobs
1 parent 6f0ff23 commit 733dac4

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

.github/workflows/build.yaml

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,8 +262,17 @@ jobs:
262262
- name: Build standalone release
263263
run: source scl_source enable devtoolset-9 && yarn release:standalone
264264

265-
# TODO@jsjoeio - can we use cache here?
265+
- name: Fetch dependencies from cache
266+
id: cache-node-modules
267+
uses: actions/cache@v3
268+
with:
269+
path: "**/node_modules"
270+
key: yarn-build-${{ hashFiles('**/yarn.lock') }}
271+
restore-keys: |
272+
yarn-build-
273+
266274
- name: Install test dependencies
275+
if: steps.cache-node-modules.outputs.cache-hit != 'true'
267276
run: SKIP_SUBMODULE_DEPS=1 yarn --frozen-lockfile
268277

269278
- name: Run integration tests on standalone release
@@ -395,8 +404,17 @@ jobs:
395404
- name: Build standalone release
396405
run: yarn release:standalone
397406

398-
# TODO@jsjoeio - can we cache here?
407+
- name: Fetch dependencies from cache
408+
id: cache-node-modules
409+
uses: actions/cache@v3
410+
with:
411+
path: "**/node_modules"
412+
key: yarn-build-${{ hashFiles('**/yarn.lock') }}
413+
restore-keys: |
414+
yarn-build-
415+
399416
- name: Install test dependencies
417+
if: steps.cache-node-modules.outputs.cache-hit != 'true'
400418
run: SKIP_SUBMODULE_DEPS=1 yarn install
401419

402420
- name: Run integration tests on standalone release

0 commit comments

Comments
 (0)