Skip to content

Commit ee20750

Browse files
Bernie Zangadamweeks
authored andcommitted
fix(tooling): update circle ci config for forked branch fix
1 parent 1a0e6a5 commit ee20750

File tree

1 file changed

+24
-21
lines changed

1 file changed

+24
-21
lines changed

.circleci/config.yml

Lines changed: 24 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -8,59 +8,62 @@ job_common: &job_common
88
docker:
99
- <<: *base_image
1010

11-
save: &save
12-
save_cache:
13-
key: js-dependencies-{{ .Branch }}-{{ .Revision }}
14-
paths:
15-
- node_modules
11+
restore_workspace: &restore_workspace
12+
attach_workspace:
13+
at: /tmp/workspace
1614

17-
restore: &restore
18-
restore_cache:
19-
key: js-dependencies-{{ .Branch }}-{{ .Revision }}
15+
restore_node_modules: &restore_node_modules
16+
run:
17+
name: Link cached node_modules to project
18+
command: mv /tmp/workspace/node_modules ./ || true
2019

2120
jobs:
2221
lockfile_update:
2322
<<: *job_common
2423
steps:
2524
- checkout
26-
- <<: *restore
25+
- <<: *restore_workspace
26+
- <<: *restore_node_modules
2727
- greenkeeper-lockfile-update
28-
- <<: *save
2928

3029
lockfile_upload:
3130
<<: *job_common
3231
steps:
3332
- checkout
34-
- <<: *restore
33+
- <<: *restore_workspace
34+
- <<: *restore_node_modules
3535
- greenkeeper-lockfile-upload
36-
- <<: *save
3736

3837
install:
3938
<<: *job_common
4039
steps:
4140
- checkout
42-
- <<: *restore
4341
- run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> .npmrc
4442
- run:
4543
name: Install dependencies
4644
command: |
4745
if [ ! -d node_modules ]; then
4846
npm install
4947
fi
48+
- run:
49+
name: Copy node_modules to workspace
50+
command: mv node_modules /tmp/
51+
- persist_to_workspace:
52+
root: /tmp
53+
paths:
54+
- node_modules
5055
- run:
5156
name: Save NPM install log
5257
command: npm ls --json > /tmp/npm_install.log || true
5358
- store_artifacts:
5459
path: /tmp/npm_install.log
5560
destination: npm-install
56-
- <<: *save
57-
58-
5961
unit_tests_and_linting:
6062
<<: *job_common
6163
steps:
6264
- checkout
63-
- <<: *restore
65+
- <<: *restore_workspace
66+
- <<: *restore_node_modules
6467
- run:
6568
name: Run eslint
6669
command: npm run eslint -- --format junit -o reports/junit/js-lint-results.xml
@@ -81,7 +84,8 @@ jobs:
8184
- NODE_ENV: "test"
8285
steps:
8386
- checkout
84-
- <<: *restore
87+
- <<: *restore_workspace
88+
- <<: *restore_node_modules
8589
- run:
8690
name: Copy and build journey test static files
8791
command: npm run build journey /tmp/dist-test
@@ -97,9 +101,8 @@ jobs:
97101
STATIC_SERVER_PATH: /tmp/workspace/dist-test
98102
steps:
99103
- checkout
100-
- <<: *restore
101-
- attach_workspace:
102-
at: /tmp/workspace
104+
- <<: *restore_workspace
105+
- <<: *restore_node_modules
103106
- run:
104107
name: Get JOURNEY_TEST_BASE_URL from Netlify deploy
105108
command: echo "export JOURNEY_TEST_BASE_URL=$(cat /tmp/workspace/.netlifyUrl)" >> $BASH_ENV

0 commit comments

Comments
 (0)