1
+ # DO NOT EDIT MANUALLY!
2
+ # autogenerated by `.circleci/pack.js` from contents of `jobs` .yml files
1
3
version : 2.1
2
4
commands :
3
5
cmd-wait-for-port :
4
6
parameters :
5
7
port :
6
8
type : integer
7
9
steps :
8
- - run : sleep 5
9
10
- run :
10
11
shell : /bin/sh
11
12
command : |
12
- wget --retry-connrefused --waitretry=1 --read-timeout=120 --timeout=120 -t 100 http://localhost:<<parameters.port>>
13
+ wget --retry-connrefused --waitretry=1 --read-timeout=120 --timeout=120 -t 300 http://localhost:<<parameters.port>>
13
14
:
14
15
jobs :
16
+ job-audit :
17
+ working_directory : ~/repo
18
+ docker :
19
+ - image : synthetixio/docker-sec-tools:14.17-ubuntu
20
+ auth :
21
+ username : $DOCKERHUB_USERNAME
22
+ password : $DOCKERHUB_TOKEN
23
+ steps :
24
+ - checkout
25
+ - run :
26
+ name : Audit dependencies
27
+ command : |
28
+ npm audit --audit-level=critical || true # Temporarily allow critical audits to pass
29
+ - run :
30
+ name : Lint lockfile
31
+ command : |
32
+ lockfile-lint -p package-lock.json --type npm --allowed-hosts npm github.com --allowed-schemes "https:" "git+ssh:"
15
33
job-compile :
16
34
working_directory : ~/repo
17
35
docker :
18
- - image : synthetixio/docker-node:14.16-focal
36
+ - image : synthetixio/docker-node:14.17-ubuntu
19
37
auth :
20
38
username : $DOCKERHUB_USERNAME
21
39
password : $DOCKERHUB_TOKEN
29
47
job-fork-tests :
30
48
working_directory : ~/repo
31
49
docker :
32
- - image : synthetixio/docker-node:14.16-focal
50
+ - image : synthetixio/docker-node:14.17-ubuntu
33
51
auth :
34
52
username : $DOCKERHUB_USERNAME
35
53
password : $DOCKERHUB_TOKEN
54
72
job-integration-tests :
55
73
working_directory : ~/repo
56
74
machine :
57
- image : ubuntu-2004:202104-01
75
+ image : ubuntu-2004:202107-02
58
76
docker_layer_caching : true
59
77
resource_class : large
60
78
steps :
@@ -63,15 +81,15 @@ jobs:
63
81
at : .
64
82
- restore_cache :
65
83
keys :
66
- - v6-optimism-build-
84
+ - v6-optimism-build-{{ checksum "package-lock.json" }}
67
85
- run :
68
86
name : Build docker containers if necessary
69
87
command : |
70
88
if [ ! -d ./optimism ]; then
71
89
npx hardhat ops --fresh --build --build-ops
72
90
fi;
73
91
- save_cache :
74
- key : v6-optimism-build-
92
+ key : v6-optimism-build-{{ checksum "package-lock.json" }}
75
93
paths :
76
94
- ./optimism
77
95
- run :
99
117
job-lint :
100
118
working_directory : ~/repo
101
119
docker :
102
- - image : synthetixio/docker-node:14.16-focal
120
+ - image : synthetixio/docker-node:14.17-ubuntu
103
121
auth :
104
122
username : $DOCKERHUB_USERNAME
105
123
password : $DOCKERHUB_TOKEN
@@ -111,7 +129,7 @@ jobs:
111
129
job-pack-browser :
112
130
working_directory : ~/repo
113
131
docker :
114
- - image : synthetixio/docker-node:14.16-focal
132
+ - image : synthetixio/docker-node:14.17-ubuntu
115
133
auth :
116
134
username : $DOCKERHUB_USERNAME
117
135
password : $DOCKERHUB_TOKEN
@@ -125,28 +143,37 @@ jobs:
125
143
job-prepare :
126
144
working_directory : ~/repo
127
145
docker :
128
- - image : synthetixio/docker-node:14.16-focal
146
+ - image : synthetixio/docker-node:14.17-ubuntu
129
147
auth :
130
148
username : $DOCKERHUB_USERNAME
131
149
password : $DOCKERHUB_TOKEN
132
150
steps :
133
151
- checkout
152
+ - attach_workspace :
153
+ at : .
134
154
- restore_cache :
135
155
keys :
136
156
- v4-dependencies-{{ checksum "package-lock.json" }}
137
- - run : npm install
157
+ - run :
158
+ name : Set custom npm cache directory
159
+ command : npm config set cache .npm-cache --global
160
+ - run :
161
+ name : Install dependencies
162
+ command : npm install --prefer-offline --no-audit
138
163
- save_cache :
139
164
key : v4-dependencies-{{ checksum "package-lock.json" }}
140
165
paths :
141
166
- node_modules
167
+ - .npm-cache
142
168
- persist_to_workspace :
143
169
root : .
144
170
paths :
145
171
- node_modules
172
+ - .npm-cache
146
173
job-simulate-release :
147
174
working_directory : ~/repo
148
175
docker :
149
- - image : synthetixio/docker-node:14.16-focal
176
+ - image : synthetixio/docker-node:14.17-ubuntu
150
177
auth :
151
178
username : $DOCKERHUB_USERNAME
152
179
password : $DOCKERHUB_TOKEN
@@ -169,7 +196,7 @@ jobs:
169
196
job-static-analysis :
170
197
working_directory : ~/repo
171
198
docker :
172
- - image : synthetixio/docker-node:14.16-focal
199
+ - image : synthetixio/docker-node:14.17-ubuntu
173
200
auth :
174
201
username : $DOCKERHUB_USERNAME
175
202
password : $DOCKERHUB_TOKEN
@@ -181,12 +208,15 @@ jobs:
181
208
name : Show Slither output
182
209
command : |
183
210
set +e
184
- slither .
211
+ slither . --disable-color 2>&1 | tee slitherReport.txt
185
212
exit 0
213
+ - store_artifacts :
214
+ path : slitherReport.txt
215
+ destination : slitherReport.txt
186
216
job-test-deploy-script :
187
217
working_directory : ~/repo
188
218
docker :
189
- - image : synthetixio/docker-node:14.16-focal
219
+ - image : synthetixio/docker-node:14.17-ubuntu
190
220
auth :
191
221
username : $DOCKERHUB_USERNAME
192
222
password : $DOCKERHUB_TOKEN
@@ -212,7 +242,7 @@ jobs:
212
242
job-unit-tests-coverage-report :
213
243
working_directory : ~/repo
214
244
docker :
215
- - image : synthetixio/docker-node :14.16-focal
245
+ - image : synthetixio/docker-sec-tools :14.17-ubuntu
216
246
auth :
217
247
username : $DOCKERHUB_USERNAME
218
248
password : $DOCKERHUB_TOKEN
@@ -224,11 +254,11 @@ jobs:
224
254
name : Upload coverage
225
255
command : |
226
256
cp -R /tmp/coverage/coverage-*.json .
227
- bash <(curl -s https://codecov.io/bash)
257
+ codecov -t $CODECOV_TOKEN
228
258
job-unit-tests-coverage :
229
259
working_directory : ~/repo
230
260
docker :
231
- - image : synthetixio/docker-node:14.16-focal
261
+ - image : synthetixio/docker-node:14.17-ubuntu
232
262
auth :
233
263
username : $DOCKERHUB_USERNAME
234
264
password : $DOCKERHUB_TOKEN
@@ -258,7 +288,7 @@ jobs:
258
288
job-unit-tests-gas-report :
259
289
working_directory : ~/repo
260
290
docker :
261
- - image : synthetixio/docker-node:14.16-focal
291
+ - image : synthetixio/docker-node:14.17-ubuntu
262
292
auth :
263
293
username : $DOCKERHUB_USERNAME
264
294
password : $DOCKERHUB_TOKEN
@@ -270,13 +300,16 @@ jobs:
270
300
name : Upload gas reports
271
301
command : |
272
302
npx hardhat test:merge-gas-reports gasReporterOutput-*.json
303
+ if [ "${CIRCLE_BRANCH}" != "master" ]; then
304
+ git branch -f master origin/master
305
+ fi
273
306
npx codechecks codechecks.unit.yml
274
307
- store_artifacts :
275
308
path : gasReporterOutput.json
276
309
job-unit-tests :
277
310
working_directory : ~/repo
278
311
docker :
279
- - image : synthetixio/docker-node:14.16-focal
312
+ - image : synthetixio/docker-node:14.17-ubuntu
280
313
auth :
281
314
username : $DOCKERHUB_USERNAME
282
315
password : $DOCKERHUB_TOKEN
@@ -308,7 +341,7 @@ jobs:
308
341
job-validate-deployments :
309
342
working_directory : ~/repo
310
343
docker :
311
- - image : synthetixio/docker-node:14.16-focal
344
+ - image : synthetixio/docker-node:14.17-ubuntu
312
345
auth :
313
346
username : $DOCKERHUB_USERNAME
314
347
password : $DOCKERHUB_TOKEN
@@ -327,7 +360,7 @@ jobs:
327
360
job-validate-etherscan :
328
361
working_directory : ~/repo
329
362
docker :
330
- - image : synthetixio/docker-node:14.16-focal
363
+ - image : synthetixio/docker-node:14.17-ubuntu
331
364
auth :
332
365
username : $DOCKERHUB_USERNAME
333
366
password : $DOCKERHUB_TOKEN
@@ -342,7 +375,10 @@ jobs:
342
375
workflows :
343
376
workflow-all :
344
377
jobs :
345
- - job-prepare
378
+ - job-audit
379
+ - job-prepare :
380
+ requires :
381
+ - job-audit
346
382
- job-lint :
347
383
requires :
348
384
- job-prepare
0 commit comments