Skip to content

Commit 0f503b5

Browse files
committed
chore: update circleci
1 parent 6cb6f5c commit 0f503b5

File tree

1 file changed

+103
-29
lines changed

1 file changed

+103
-29
lines changed

.circleci/config.yml

Lines changed: 103 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -22,121 +22,195 @@ references:
2222
key: npm-cache
2323

2424
install_react: &install_react
25-
run: ./scripts/install-react.sh
25+
run: REACT=15 ./scripts/install-react.sh
26+
27+
react_15: &react_15
28+
environment:
29+
REACT: 15
30+
31+
react_16: &react_16
32+
environment:
33+
REACT: 16
2634

2735
jobs:
2836
setup:
2937
<<: *container_config
3038
steps:
39+
- checkout
3140
- *restore_cache
32-
- run: npm install
3341
- run: node -v
3442
- run: npm -v
43+
- run: npm install
44+
- run:
45+
command: |
46+
set +eo
47+
npm ls
48+
true
3549
- *save_cache
3650
- persist_to_workspace:
3751
root: ~/ant-design
3852
paths:
39-
- ./*
53+
- node_modules
54+
55+
dist:
56+
<<: *container_config
57+
steps:
58+
- checkout
59+
- *attach_workspace
60+
- run: npm run dist
61+
- run: node ./tests/dekko/dist.test.js
62+
- persist_to_workspace:
63+
root: ~/ant-design
64+
paths:
65+
- dist
66+
67+
compile:
68+
<<: *container_config
69+
steps:
70+
- checkout
71+
- *attach_workspace
72+
- run: npm run compile
73+
- run: node ./tests/dekko/lib.test.js
74+
- persist_to_workspace:
75+
root: ~/ant-design
76+
paths:
77+
- lib
78+
- es
4079

4180
lint:
4281
<<: *container_config
4382
steps:
83+
- checkout
4484
- *attach_workspace
4585
- run: npm run lint
4686

4787
test_dist:
4888
<<: *container_config
89+
<<: *react_16
4990
steps:
91+
- checkout
5092
- *attach_workspace
51-
- run: npm run dist
52-
- run: node ./tests/dekko/dist.test.js
53-
- run: REACT=16 LIB_DIR=dist npm test
93+
- run:
94+
command: npm test -- -w 2
95+
environment:
96+
LIB_DIR: dist
5497

5598
test_lib:
5699
<<: *container_config
100+
<<: *react_16
57101
steps:
102+
- checkout
58103
- *attach_workspace
59-
- run: npm run compile
60-
- run: node ./tests/dekko/lib.test.js
61-
- run: REACT=16 LIB_DIR=lib npm test
104+
- run:
105+
command: npm test -- -w 2
106+
environment:
107+
LIB_DIR: lib
62108

63109
test_es:
64110
<<: *container_config
111+
<<: *react_16
65112
steps:
113+
- checkout
66114
- *attach_workspace
67-
- run: npm run compile
68-
- run: REACT=16 LIB_DIR=es npm test
115+
- run:
116+
command: npm test -- -w 2
117+
environment:
118+
LIB_DIR: es
69119

70120
test_dom:
71121
<<: *container_config
122+
<<: *react_16
72123
steps:
124+
- checkout
73125
- *attach_workspace
74-
- run: REACT=16 npm test -- --coverage
126+
- run: npm test -- -w 2 --coverage
75127
- run: bash <(curl -s https://codecov.io/bash)
76128

77129
test_node:
78130
<<: *container_config
131+
<<: *react_16
79132
steps:
133+
- checkout
80134
- *attach_workspace
81-
- run: REACT=16 npm run test-node
135+
- run: npm run test-node -- -w 2
82136

83137
test_dist_15:
84138
<<: *container_config
139+
<<: *react_15
85140
steps:
141+
- checkout
86142
- *attach_workspace
87143
- *install_react
88-
- run: node ./tests/dekko/dist.test.js
89-
- run: REACT=15 LIB_DIR=dist npm test -u
144+
- run:
145+
command: npm test -- -w 2 -u
146+
environment:
147+
LIB_DIR: dist
90148

91149
test_lib_15:
92150
<<: *container_config
151+
<<: *react_15
93152
steps:
153+
- checkout
94154
- *attach_workspace
95155
- *install_react
96-
- run: npm run compile
97-
- run: node ./tests/dekko/lib.test.js
98-
- run: REACT=15 LIB_DIR=lib npm test
156+
- run:
157+
command: npm test -- -w 2 -u
158+
environment:
159+
LIB_DIR: lib
99160

100161
test_es_15:
101162
<<: *container_config
163+
<<: *react_15
102164
steps:
165+
- checkout
103166
- *attach_workspace
104167
- *install_react
105-
- run: npm run compile
106-
- run: REACT=15 LIB_DIR=es npm test
168+
- run:
169+
command: npm test -- -w 2 -u
170+
environment:
171+
LIB_DIR: es
107172

108173
test_dom_15:
109174
<<: *container_config
175+
<<: *react_15
110176
steps:
177+
- checkout
111178
- *attach_workspace
112179
- *install_react
113-
- run: REACT=15 npm test -- --coverage
114-
- run: bash <(curl -s https://codecov.io/bash)
180+
- run: npm test -- -w 2 -u
115181

116182
test_node_15:
117183
<<: *container_config
184+
<<: *react_15
118185
steps:
186+
- checkout
119187
- *attach_workspace
120188
- *install_react
121-
- run: REACT=15 npm run test-node
189+
- run: npm run test-node -- -w 2 -u
122190

123191
workflows:
124192
version: 2
125193
build-test:
126194
jobs:
127195
- setup
196+
- dist:
197+
requires:
198+
- setup
199+
- compile:
200+
requires:
201+
- setup
128202
- lint:
129203
requires:
130204
- setup
131205
- test_dist:
132206
requires:
133-
- setup
207+
- dist
134208
- test_lib:
135209
requires:
136-
- setup
210+
- compile
137211
- test_es:
138212
requires:
139-
- setup
213+
- compile
140214
- test_dom:
141215
requires:
142216
- setup
@@ -145,13 +219,13 @@ workflows:
145219
- setup
146220
- test_dist_15:
147221
requires:
148-
- setup
222+
- dist
149223
- test_lib_15:
150224
requires:
151-
- setup
225+
- compile
152226
- test_es_15:
153227
requires:
154-
- setup
228+
- compile
155229
- test_dom_15:
156230
requires:
157231
- setup

0 commit comments

Comments
 (0)