@@ -2,34 +2,37 @@ version: 2
2
2
3
3
job_common : &job_common
4
4
docker :
5
- - image : cimg/node:12.22.12
5
+ - image : cimg/node:14.18.2
6
6
auth :
7
7
username : colonyci
8
8
password : $COLONYCI_DOCKERHUB_PASSWORD
9
9
working_directory : ~/colonyNetwork
10
+ run :
10
11
job_python : &job_python
11
12
docker :
12
- - image : circleci /python:3.8.0b1-stretch -node
13
+ - image : cimg /python:3.8.13 -node
13
14
auth :
14
15
username : colonyci
15
16
password : $COLONYCI_DOCKERHUB_PASSWORD
16
17
working_directory : ~/colonyNetwork
17
18
step_save_cache : &step_save_cache
18
19
save_cache :
19
20
paths :
20
- - ~/.cache/yarn
21
- key : node-modules-{{ checksum "yarn. lock" }}
21
+ - ~/.npm
22
+ key : node-modules-{{ checksum "package- lock.json " }}
22
23
step_restore_cache : &step_restore_cache
23
24
restore_cache :
24
25
keys :
25
- - node-modules-{{ checksum "yarn. lock" }}
26
+ - node-modules-{{ checksum "package- lock.json " }}
26
27
step_setup_global_packages : &step_setup_global_packages
27
28
run :
28
29
name : " Set up global packages"
29
30
command : |
30
- yarn --pure-lockfile --ignore-engines --network-concurrency 1
31
+ npm set cache ~/.npm
32
+ sudo npm install -g npm@8.5.5
33
+ npm ci
31
34
git submodule update --remote --init
32
- yarn run provision:token:contracts
35
+ npm run provision:token:contracts
33
36
step_pull_solc_docker : &step_pull_solc_docker
34
37
run :
35
38
name : " Pull solc docker image"
@@ -41,10 +44,10 @@ step_setup_slither: &step_setup_slither
41
44
wget https://github.com/ethereum/solidity/releases/download/v0.5.8/solc-static-linux
42
45
chmod +x solc-static-linux
43
46
sudo mv solc-static-linux /usr/local/bin/solc
44
- sudo pip install slither-analyzer
45
- sudo pip install solc-select
46
- sudo solc-select install 0.7.3
47
- sudo solc-select use 0.7.3
47
+ pip install slither-analyzer
48
+ pip install solc-select
49
+ solc-select install 0.7.3
50
+ solc-select use 0.7.3
48
51
49
52
jobs :
50
53
reputation-test :
@@ -63,10 +66,10 @@ jobs:
63
66
sudo apt-get install lsof
64
67
- run :
65
68
name : " Running reputation system unit tests"
66
- command : yarn run test:reputation
69
+ command : npm run test:reputation
67
70
- run :
68
71
name : " Running storage consistency smoke tests"
69
- command : yarn run test:contracts:smoke
72
+ command : npm run test:contracts:smoke
70
73
lint-and-unit-test :
71
74
<< : *job_common
72
75
steps :
@@ -111,43 +114,52 @@ jobs:
111
114
sudo apt-get install lsof
112
115
- run :
113
116
name : " Linting JavaScript"
114
- command : yarn run eslint
117
+ command : npm run eslint
115
118
- run :
116
119
name : " Linting Solidity"
117
- command : yarn run solhint
120
+ command : npm run solhint
121
+ - run :
122
+ name : " Building Docs"
123
+ command : npm run build:docs
124
+ - run :
125
+ name : " Check git hooks run"
126
+ command : npm run check:gitchanges
118
127
- run :
119
128
name : " Checking contract storage variables"
120
- command : yarn run check:storagevars
129
+ command : npm run check:storagevars
121
130
- run :
122
131
name : " Checking contract recovery modifiers"
123
- command : yarn run check:recoverymods
132
+ command : npm run check:recoverymods
124
133
- run :
125
134
name : " Checking contract versions"
126
- command : yarn run check:versioning
135
+ command : npm run check:versioning
136
+ - run :
137
+ name : " Provision token contracts again (needed after version check script)"
138
+ command : npm run provision:token:contracts
127
139
- run :
128
140
name : " Checking contract authDomain modifiers"
129
- command : yarn run check:auth
141
+ command : npm run check:auth
130
142
- run :
131
143
name : " Running network contracts unit tests"
132
- command : yarn run test:contracts
144
+ command : npm run test:contracts
133
145
- run :
134
146
name : " Cleanup ganache leftovers"
135
- command : yarn run clean:ganache
147
+ command : npm run clean:ganache
136
148
- run :
137
149
name : " Running extension contracts unit tests"
138
- command : yarn run test:contracts:extensions
150
+ command : npm run test:contracts:extensions
139
151
- run :
140
152
name : " Cleanup ganache leftovers"
141
- command : yarn run clean:ganache
153
+ command : npm run clean:ganache
142
154
- run :
143
155
name : " Running upgrade tests"
144
- command : yarn run test:contracts:upgrade:parity && yarn run test:contracts:upgrade:ganache
156
+ command : npm run test:contracts:upgrade:parity && npm run test:contracts:upgrade:ganache
145
157
- run :
146
158
name : " Running gas cost tests"
147
- command : yarn run test:contracts:gasCosts && yarn run codechecks
159
+ command : npm run test:contracts:gasCosts && npx codechecks
148
160
- run :
149
161
name : " Running patricia tree tests"
150
- command : yarn run test:contracts:patricia
162
+ command : npm run test:contracts:patricia
151
163
- << : *step_save_cache
152
164
# Save test results
153
165
- store_test_results :
@@ -167,7 +179,7 @@ jobs:
167
179
- << : *step_setup_global_packages
168
180
- run :
169
181
name : " Running core contract unit tests with coverage"
170
- command : yarn run test:contracts:coverage
182
+ command : npm run test:contracts:coverage
171
183
environment :
172
184
NODE_OPTIONS : --max_old_space_size=4096
173
185
- persist_to_workspace :
@@ -185,7 +197,7 @@ jobs:
185
197
- << : *step_setup_global_packages
186
198
- run :
187
199
name : " Running upgrade tests with coverage"
188
- command : yarn run test:contracts:upgrade:coverage
200
+ command : npm run test:contracts:upgrade:coverage
189
201
environment :
190
202
NODE_OPTIONS : --max_old_space_size=4096
191
203
- persist_to_workspace :
@@ -203,7 +215,7 @@ jobs:
203
215
- << : *step_setup_global_packages
204
216
- run :
205
217
name : " Running extension contract unit tests with coverage"
206
- command : yarn run test:contracts:extensions:coverage
218
+ command : npm run test:contracts:extensions:coverage
207
219
environment :
208
220
NODE_OPTIONS : --max_old_space_size=4096
209
221
- persist_to_workspace :
@@ -221,7 +233,7 @@ jobs:
221
233
- << : *step_setup_global_packages
222
234
- run :
223
235
name : " Running reputation tests with coverage"
224
- command : yarn run test:reputation:coverage
236
+ command : npm run test:reputation:coverage
225
237
environment :
226
238
NODE_OPTIONS : --max_old_space_size=4096
227
239
- persist_to_workspace :
@@ -239,22 +251,22 @@ jobs:
239
251
- << : *step_setup_global_packages
240
252
- run :
241
253
name : " Running chainid tests with coverage for mainnet"
242
- command : CHAIN_ID=1 yarn run test:contracts:chainid:coverage
254
+ command : CHAIN_ID=1 npm run test:contracts:chainid:coverage
243
255
environment :
244
256
NODE_OPTIONS : --max_old_space_size=4096
245
257
- run :
246
258
name : " Running chainid tests with coverage for goerli"
247
- command : CHAIN_ID=5 yarn run test:contracts:chainid:coverage
259
+ command : CHAIN_ID=5 npm run test:contracts:chainid:coverage
248
260
environment :
249
261
NODE_OPTIONS : --max_old_space_size=4096
250
262
- run :
251
263
name : " Running chainid tests with coverage for xDai"
252
- command : CHAIN_ID=100 yarn run test:contracts:chainid:coverage
264
+ command : CHAIN_ID=100 npm run test:contracts:chainid:coverage
253
265
environment :
254
266
NODE_OPTIONS : --max_old_space_size=4096
255
267
- run :
256
268
name : " Running chainid tests with coverage for an unsupported network"
257
- command : CHAIN_ID=777 yarn run test:contracts:chainid:coverage
269
+ command : CHAIN_ID=777 npm run test:contracts:chainid:coverage
258
270
environment :
259
271
NODE_OPTIONS : --max_old_space_size=4096
260
272
- persist_to_workspace :
@@ -271,12 +283,12 @@ jobs:
271
283
- << : *step_restore_cache
272
284
- run :
273
285
name : " Install packages"
274
- command : yarn --pure-lockfile --ignore-engines --network-concurrency 1
286
+ command : npm ci
275
287
- attach_workspace :
276
288
at : ./
277
289
- run :
278
290
name : " Merge coverage runs and check coverage thresholds"
279
- command : yarn run check:coverage
291
+ command : npm run check:coverage
280
292
# Save coverage artifacts
281
293
- store_artifacts :
282
294
path : coverage-merged
@@ -294,7 +306,7 @@ jobs:
294
306
name : " Slither analysis"
295
307
command : |
296
308
rm build/contracts/*
297
- yarn run test:security:slither
309
+ npm run test:security:slither
298
310
end-to-end-tests :
299
311
<< : *job_common
300
312
steps :
@@ -306,7 +318,7 @@ jobs:
306
318
- << : *step_setup_global_packages
307
319
- run :
308
320
name : " Running end-to-end tests"
309
- command : yarn run test:contracts:e2e
321
+ command : npm run test:contracts:e2e
310
322
311
323
workflows :
312
324
version : 2
0 commit comments