@@ -18,6 +18,12 @@ x-config:
1818 paths : [~/.gradle]
1919 - &restore-cache-gradle
2020 key : ' v1-gradle-dependencies-{{ arch }}-{{ checksum "android/build.gradle" }}-{{ checksum "android/app/build.gradle" }}-{{ checksum "node_modules/react-native/package.json" }}'
21+ x-workspace :
22+ - &persist-workspace-node_modules
23+ root : ./node_modules
24+ paths : [./*]
25+ - &attach-workspace-node_modules
26+ at : ./node_modules
2127 x-commands : # command shorthands
2228 - &set-ruby-version
2329 name : Set Ruby Version
@@ -106,6 +112,7 @@ jobs:
106112 - run : yarn install --frozen-lockfile
107113 - run : yarn --version
108114 - save_cache : *save-cache-yarn
115+ - persist_to_workspace : *persist-workspace-node_modules
109116
110117 cache-bundler-linux :
111118 docker : [{image: 'circleci/ruby:2.4'}]
@@ -125,8 +132,7 @@ jobs:
125132 task : JS-general
126133 steps :
127134 - checkout
128- - restore_cache : *restore-cache-yarn
129- - run : yarn install --frozen-lockfile
135+ - attach_workspace : *attach-workspace-node_modules
130136 - run : *run-danger
131137
132138 flow :
@@ -135,8 +141,7 @@ jobs:
135141 task : JS-flow
136142 steps :
137143 - checkout
138- - restore_cache : *restore-cache-yarn
139- - run : yarn install --frozen-lockfile
144+ - attach_workspace : *attach-workspace-node_modules
140145 - run : mkdir -p logs/
141146 - run : yarn run bundle-data
142147 - run : yarn run --silent flow check --quiet | tee logs/flow
@@ -149,8 +154,7 @@ jobs:
149154 JEST_JUNIT_OUTPUT : ./test-results/jest/junit.xml
150155 steps :
151156 - checkout
152- - restore_cache : *restore-cache-yarn
153- - run : yarn install --frozen-lockfile
157+ - attach_workspace : *attach-workspace-node_modules
154158 - run : mkdir -p logs/ test-results/jest/
155159 - run : yarn run bundle-data
156160 - run : yarn run --silent test --coverage | tee logs/jest
@@ -174,8 +178,7 @@ jobs:
174178 task : JS-prettier
175179 steps :
176180 - checkout
177- - restore_cache : *restore-cache-yarn
178- - run : yarn install --frozen-lockfile
181+ - attach_workspace : *attach-workspace-node_modules
179182 - run : mkdir -p logs/
180183 - run : yarn run prettier
181184 - run :
@@ -193,8 +196,7 @@ jobs:
193196 task : JS-lint
194197 steps :
195198 - checkout
196- - restore_cache : *restore-cache-yarn
197- - run : yarn install --frozen-lockfile
199+ - attach_workspace : *attach-workspace-node_modules
198200 - run : mkdir -p logs/ test-results/eslint/
199201 - run : yarn run bundle-data
200202 - run : yarn run --silent lint | tee logs/eslint
@@ -209,8 +211,7 @@ jobs:
209211 task : JS-data
210212 steps :
211213 - checkout
212- - restore_cache : *restore-cache-yarn
213- - run : yarn install --frozen-lockfile
214+ - attach_workspace : *attach-workspace-node_modules
214215 - run : mkdir -p logs/
215216 - run : yarn run --silent validate-data --quiet | tee logs/validate-data
216217 - run : yarn run --silent validate-bus-data | tee logs/validate-bus-data
@@ -234,8 +235,7 @@ jobs:
234235 - run : node --version
235236 - run : yarn --version
236237 - run : *set-ruby-version
237- - restore_cache : *restore-cache-yarn
238- - run : yarn install --frozen-lockfile
238+ - attach_workspace : *attach-workspace-node_modules
239239 - restore_cache : *restore-cache-bundler
240240 - run : bundle check || bundle install --frozen --path ./vendor/bundle
241241 - restore_cache : *restore-cache-gradle
@@ -267,8 +267,7 @@ jobs:
267267 task : JS-bundle-android
268268 steps :
269269 - checkout
270- - restore_cache : *restore-cache-yarn
271- - run : yarn install --frozen-lockfile
270+ - attach_workspace : *attach-workspace-node_modules
272271 - run : mkdir -p logs/
273272 - run : *embed-env-vars
274273 - run : yarn run bundle-data
@@ -326,8 +325,7 @@ jobs:
326325 task : JS-bundle-ios
327326 steps :
328327 - checkout
329- - restore_cache : *restore-cache-yarn
330- - run : yarn install --frozen-lockfile
328+ - attach_workspace : *attach-workspace-node_modules
331329 - run : mkdir -p logs/
332330 - run : *embed-env-vars
333331 - run : yarn run bundle-data
0 commit comments