@@ -10,7 +10,7 @@ version: 2.0
10
10
jobs :
11
11
install-and-cibuild :
12
12
docker :
13
- - image : circleci/node:12.13.0
13
+ - image : circleci/node:12.22.1
14
14
working_directory : ~/plotly.js
15
15
steps :
16
16
- checkout
43
43
no-gl-jasmine :
44
44
docker :
45
45
# need '-browsers' version to test in real (xvfb-wrapped) browsers
46
- - image : circleci/node:12.13.0 -browsers
47
- parallelism : 2
46
+ - image : circleci/node:12.22.1 -browsers
47
+ parallelism : 8
48
48
working_directory : ~/plotly.js
49
49
steps :
50
50
- attach_workspace :
56
56
webgl-jasmine :
57
57
docker :
58
58
# need '-browsers' version to test in real (xvfb-wrapped) browsers
59
- - image : circleci/node:12.13.0 -browsers
60
- parallelism : 3
59
+ - image : circleci/node:12.22.1 -browsers
60
+ parallelism : 8
61
61
working_directory : ~/plotly.js
62
62
steps :
63
63
- attach_workspace :
@@ -66,60 +66,132 @@ jobs:
66
66
name : Run jasmine tests (part B)
67
67
command : ./.circleci/test.sh webgl-jasmine
68
68
69
- no-gl-flaky -jasmine :
69
+ flaky- no-gl-jasmine :
70
70
docker :
71
71
# need '-browsers' version to test in real (xvfb-wrapped) browsers
72
- - image : circleci/node:12.13.0 -browsers
72
+ - image : circleci/node:12.22.1 -browsers
73
73
working_directory : ~/plotly.js
74
74
steps :
75
75
- attach_workspace :
76
76
at : ~/
77
77
- run :
78
78
name : Run jasmine tests (part C)
79
- command : ./.circleci/test.sh no-gl-flaky -jasmine
79
+ command : ./.circleci/test.sh flaky- no-gl-jasmine
80
80
81
- stable-image :
82
- docker :
83
- - image : plotly/testbed:latest
81
+ make-baselines :
84
82
parallelism : 4
85
- working_directory : /var/www/streambed/image_server/plotly.js/
83
+ docker :
84
+ - image : circleci/python:3.8.9
85
+ working_directory : ~/plotly.js
86
86
steps :
87
87
- attach_workspace :
88
- at : /var/www/streambed/image_server/
88
+ at : ~/
89
+ - run :
90
+ name : which pip3 version
91
+ command : which pip3 && pip3 --version
92
+ - run :
93
+ name : install kaleido v0.2.1
94
+ command : python3 -m pip install kaleido==0.2.1
95
+ - run :
96
+ name : install plotly.io v5.0.0
97
+ command : python3 -m pip install plotly==5.0.0
98
+ - run :
99
+ name : install liberation2 fonts
100
+ command : sudo apt-get install fonts-liberation2
101
+ - run :
102
+ name : install OpenSans fonts
103
+ command : sudo apt-get install fonts-open-sans
89
104
- run :
90
- name : Run and setup container
105
+ name : install NotoSansCJK fonts
106
+ command : sudo apt install fonts-noto-cjk
107
+ - run :
108
+ name : download google fonts e.g. Dosis, GravitasOne, NotoSansMono, NotoSans, NotoSerif, Old_Standard_TT, PT_Sans_Narrow, Raleway and Roboto
109
+ command : python3 ./.circleci/download_google_fonts.py
110
+ - run :
111
+ name : install downloaded google fonts
91
112
command : |
92
- supervisord &
93
- npm run docker -- setup
113
+ sudo cp -r .circleci/fonts/ /usr/share/
114
+ sudo fc-cache -f
115
+ - run :
116
+ name : create all png files
117
+ command : ./.circleci/test.sh make-baselines
118
+ - persist_to_workspace :
119
+ root : ~/
120
+ paths :
121
+ - plotly.js
122
+
123
+ test-baselines :
124
+ docker :
125
+ - image : circleci/node:12.22.1
126
+ working_directory : ~/plotly.js
127
+ steps :
128
+ - attach_workspace :
129
+ at : ~/
94
130
- run :
95
- name : Run image tests (part A)
96
- command : ./.circleci/test.sh stable -image
131
+ name : compare pixels
132
+ command : ./.circleci/test.sh test -image ; find build -maxdepth 1 -type f -delete
97
133
- store_artifacts :
98
134
path : build
99
135
destination : /
100
136
101
- flaky-image :
137
+ make-exports :
102
138
docker :
103
- - image : plotly/testbed:latest
104
- working_directory : /var/www/streambed/image_server/ plotly.js/
139
+ - image : circleci/python:3.8.9
140
+ working_directory : ~/ plotly.js
105
141
steps :
106
142
- attach_workspace :
107
- at : /var/www/streambed/image_server /
143
+ at : ~ /
108
144
- run :
109
- name : Run and setup container
110
- command : |
111
- supervisord &
112
- npm run docker -- setup
145
+ name : which pip3 version
146
+ command : which pip3 && pip3 --version
147
+ - run :
148
+ name : install kaleido v0.2.1
149
+ command : python3 -m pip install kaleido==0.2.1
150
+ - run :
151
+ name : install plotly.io v5.0.0
152
+ command : python3 -m pip install plotly==5.0.0
153
+ - run :
154
+ name : install poppler-utils to have pdftops for exporting eps
155
+ command : sudo apt-get install poppler-utils
113
156
- run :
114
- name : Run image tests (part B)
115
- command : ./.circleci/test.sh flaky-image
157
+ name : create svg, jpg, jpeg, webp, pdf and eps files
158
+ command : python3 test/image/make_exports.py
159
+ - persist_to_workspace :
160
+ root : ~/
161
+ paths :
162
+ - plotly.js
163
+
164
+ test-exports :
165
+ docker :
166
+ - image : circleci/node:12.22.1
167
+ working_directory : ~/plotly.js
168
+ steps :
169
+ - attach_workspace :
170
+ at : ~/
171
+ - run :
172
+ name : test export sizes
173
+ command : node test/image/export_test.js ; find build -maxdepth 1 -type f -delete
116
174
- store_artifacts :
117
175
path : build
118
176
destination : /
119
177
178
+ mock-validation :
179
+ docker :
180
+ - image : circleci/node:12.22.1
181
+ working_directory : ~/plotly.js
182
+ steps :
183
+ - attach_workspace :
184
+ at : ~/
185
+ - run :
186
+ name : Test validation using node.js and jsdom
187
+ command : npm run test-plain-obj
188
+ - run :
189
+ name : Validate mocks
190
+ command : npm run test-mock
191
+
120
192
source-syntax :
121
193
docker :
122
- - image : circleci/node:12.13.0
194
+ - image : circleci/node:12.22.1
123
195
working_directory : ~/plotly.js
124
196
steps :
125
197
- attach_workspace :
@@ -131,7 +203,7 @@ jobs:
131
203
jasmine-bundle :
132
204
docker :
133
205
# need '-browsers' version to test in real (xvfb-wrapped) browsers
134
- - image : circleci/node:12.13.0 -browsers
206
+ - image : circleci/node:12.22.1 -browsers
135
207
working_directory : ~/plotly.js
136
208
steps :
137
209
- attach_workspace :
@@ -142,7 +214,7 @@ jobs:
142
214
143
215
publish-dist :
144
216
docker :
145
- - image : circleci/node:12.13.0
217
+ - image : circleci/node:12.22.1
146
218
working_directory : ~/plotly.js
147
219
steps :
148
220
- attach_workspace :
@@ -170,9 +242,18 @@ jobs:
170
242
echo https://$CIRCLE_BUILD_NUM-$PROJECT_NUM-gh.circle-artifacts.com/0/dist/plotly.js
171
243
echo https://$CIRCLE_BUILD_NUM-$PROJECT_NUM-gh.circle-artifacts.com/0/dist/plotly.min.js
172
244
echo https://$CIRCLE_BUILD_NUM-$PROJECT_NUM-gh.circle-artifacts.com/0/dist/plot-schema.json
173
- - run :
174
- name : Test validation using node.js and jsdom
175
- command : npm run test-plain-obj
245
+ - persist_to_workspace :
246
+ root : ~/
247
+ paths :
248
+ - plotly.js
249
+
250
+ test-dist1 :
251
+ docker :
252
+ - image : circleci/node:12.22.1
253
+ working_directory : ~/plotly.js
254
+ steps :
255
+ - attach_workspace :
256
+ at : ~/
176
257
- run :
177
258
name : Test plotly.min.js import using requirejs
178
259
command : npm run test-requirejs
@@ -182,13 +263,19 @@ jobs:
182
263
- run :
183
264
name : Test certain bundles against function constructors
184
265
command : npm run no-new-func
266
+
267
+ test-dist2 :
268
+ docker :
269
+ - image : circleci/node:12.22.1
270
+ working_directory : ~/plotly.js
271
+ steps :
272
+ - attach_workspace :
273
+ at : ~/
185
274
- run :
186
275
name : Test plotly bundles against es6
187
276
command : npm run no-es6-dist
188
277
- run :
189
278
name : Test plotly bundles againt duplicate keys
190
- environment :
191
- NODE_OPTIONS : --max_old_space_size=4096
192
279
command : npm run no-dup-keys
193
280
194
281
workflows :
@@ -205,13 +292,22 @@ workflows:
205
292
- webgl-jasmine :
206
293
requires :
207
294
- install-and-cibuild
208
- - no-gl-flaky-jasmine :
295
+ - flaky-no-gl-jasmine :
296
+ requires :
297
+ - install-and-cibuild
298
+ - make-baselines :
209
299
requires :
210
300
- install-and-cibuild
211
- - stable-image :
301
+ - test-baselines :
302
+ requires :
303
+ - make-baselines
304
+ - make-exports :
212
305
requires :
213
306
- install-and-cibuild
214
- - flaky-image :
307
+ - test-exports :
308
+ requires :
309
+ - make-exports
310
+ - mock-validation :
215
311
requires :
216
312
- install-and-cibuild
217
313
- source-syntax :
@@ -220,3 +316,9 @@ workflows:
220
316
- publish-dist :
221
317
requires :
222
318
- install-and-cibuild
319
+ - test-dist1 :
320
+ requires :
321
+ - publish-dist
322
+ - test-dist2 :
323
+ requires :
324
+ - publish-dist
0 commit comments