Skip to content

Commit 208eafa

Browse files
committed
Restructure tests on circle ci
1 parent 831d271 commit 208eafa

File tree

1 file changed

+33
-9
lines changed

1 file changed

+33
-9
lines changed

.circleci/config.yml

Lines changed: 33 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,44 @@
11
version: 2.1
22

33
commands:
4-
test-nodejs:
4+
prepare-env:
55
steps:
6-
- run:
7-
name: NPM Versions
8-
command: npm version
96
- checkout
107
- restore_cache:
118
keys:
129
- v{{ .Environment.CIRCLE_CACHE_VERSION }}-{{ arch }}-npm-cache-{{ .Branch }}-{{ .Environment.CIRCLE_JOB }}
1310
- v{{ .Environment.CIRCLE_CACHE_VERSION }}-{{ arch }}-npm-cache-master-{{ .Environment.CIRCLE_JOB }}
11+
prepare-lint:
12+
steps:
13+
- run:
14+
name: Install standard linter
15+
command: npm i standard
16+
setup-nodejs:
17+
steps:
18+
- prepare-env
19+
- run:
20+
name: NPM Versions
21+
command: npm version
1422
- run:
1523
name: Install dependencies
1624
command: npm ci
1725
- run:
1826
name: Webpack build
1927
command: npm run build
28+
- save-npm-cache
29+
run-tests:
30+
steps:
31+
- setup-nodejs
2032
- run:
2133
name: Test
2234
command: npm test
23-
- save-npm-cache
35+
run-lint:
36+
steps:
37+
- prepare-env
38+
- prepare-lint
39+
- run:
40+
name: Lint
41+
command: npm run test:lint
2442
save-npm-cache:
2543
steps:
2644
- save_cache:
@@ -29,13 +47,19 @@ commands:
2947
- ~/.npm/_cacache
3048

3149
jobs:
32-
node-v10:
50+
test-node-v10:
51+
docker:
52+
- image: node:10
53+
steps:
54+
- run-tests
55+
lint-node-v10:
3356
docker:
3457
- image: node:10
3558
steps:
36-
- test-nodejs
59+
- run-lint
3760

3861
workflows:
39-
unit-test:
62+
test:
4063
jobs:
41-
- node-v10
64+
- test-node-v10
65+
- lint-node-v10

0 commit comments

Comments
 (0)