Skip to content

Commit 8e1a24d

Browse files
author
Brian Vaughn
committed
Add DevTools ext. node_modules to Circle CI cache
1 parent 687efcb commit 8e1a24d

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

.circleci/config.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@ aliases:
1818
keys:
1919
- v2-node-{{ arch }}-{{ .Branch }}-{{ checksum "yarn.lock" }}-{{ checksum "workspace_info.txt" }}-node-modules
2020

21+
- &restore_devtools_node_modules
22+
restore_cache:
23+
name: Restore DevTools node_modules cache
24+
keys:
25+
- v2-node-{{ arch }}-{{ .Branch }}-{{ checksum "yarn.lock" }}-{{ checksum "workspace_info.txt" }}-devotols-node-modules
26+
2127
- &TEST_PARALLELISM 20
2228

2329
- &attach_workspace
@@ -65,6 +71,14 @@ jobs:
6571
key: v2-node-{{ arch }}-{{ .Branch }}-{{ checksum "yarn.lock" }}-{{ checksum "workspace_info.txt" }}-node-modules
6672
paths:
6773
- node_modules
74+
- save_cache:
75+
# Store node_modules for all jobs in this workflow so that they don't
76+
# need to each run a yarn install for each job. This will speed up
77+
# all jobs run on this branch with the same lockfile.
78+
name: Save node_modules cache
79+
# This cache key is per branch, a yarn install in setup is required.
80+
key: v2-node-{{ arch }}-{{ .Branch }}-{{ checksum "yarn.lock" }}-{{ checksum "workspace_info.txt" }}-devotols-node-modules
81+
paths:
6882
- packages/react-devtools-extensions/node_modules
6983

7084
yarn_lint:
@@ -75,6 +89,7 @@ jobs:
7589
- checkout
7690
- run: yarn workspaces info | head -n -1 > workspace_info.txt
7791
- *restore_node_modules
92+
- *restore_devtools_node_modules
7893
- run: node ./scripts/prettier/index
7994
- run: node ./scripts/tasks/eslint
8095
- run: ./scripts/circleci/check_license.sh
@@ -218,6 +233,7 @@ jobs:
218233
- run: yarn workspaces info | head -n -1 > workspace_info.txt
219234
- *restore_yarn_cache
220235
- *restore_node_modules
236+
- *restore_devtools_node_modules
221237
- run:
222238
name: Install Packages
223239
command: yarn --frozen-lockfile --cache-folder ~/.cache/yarn

0 commit comments

Comments
 (0)