Skip to content

Commit 668c371

Browse files
committed
Merge branch 'version-2.2.0' into dummy-anchor-href
2 parents ddef8c7 + 6f006ee commit 668c371

File tree

2,734 files changed

+822128
-492105
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,734 files changed

+822128
-492105
lines changed

.circleci/config.yml

Lines changed: 189 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,16 @@ version: 2.0
88
# https://hub.docker.com/r/circleci/node/tags/
99

1010
jobs:
11-
build:
11+
install-and-cibuild:
1212
docker:
13-
- image: circleci/node:12.13.0
13+
- image: circleci/node:12.22.1
1414
working_directory: ~/plotly.js
1515
steps:
1616
- checkout
17+
- run:
18+
name: set heap option before very first node.js call
19+
command: |
20+
export NODE_OPTIONS='--max-old-space-size=4096'
1721
- run:
1822
name: Install dependencies
1923
command: |
@@ -36,109 +40,181 @@ jobs:
3640
paths:
3741
- plotly.js
3842

39-
test-jasmine:
43+
no-gl-jasmine:
4044
docker:
4145
# need '-browsers' version to test in real (xvfb-wrapped) browsers
42-
- image: circleci/node:12.13.0-browsers
43-
parallelism: 2
46+
- image: circleci/node:12.22.1-browsers
47+
parallelism: 8
4448
working_directory: ~/plotly.js
4549
steps:
4650
- attach_workspace:
4751
at: ~/
4852
- run:
49-
name: Run jasmine tests (batch 1)
50-
command: ./.circleci/test.sh jasmine
53+
name: Run jasmine tests (part A)
54+
command: .circleci/test.sh no-gl-jasmine
5155

52-
test-jasmine2:
56+
webgl-jasmine:
5357
docker:
5458
# need '-browsers' version to test in real (xvfb-wrapped) browsers
55-
- image: circleci/node:12.13.0-browsers
56-
parallelism: 3
59+
- image: circleci/node:12.22.1-browsers
60+
parallelism: 8
5761
working_directory: ~/plotly.js
5862
steps:
5963
- attach_workspace:
6064
at: ~/
6165
- run:
62-
name: Run jasmine tests (batch 2)
63-
command: ./.circleci/test.sh jasmine2
66+
name: Run jasmine tests (part B)
67+
command: .circleci/test.sh webgl-jasmine
6468

65-
test-jasmine3:
69+
flaky-no-gl-jasmine:
6670
docker:
6771
# need '-browsers' version to test in real (xvfb-wrapped) browsers
68-
- image: circleci/node:12.13.0-browsers
72+
- image: circleci/node:12.22.1-browsers
6973
working_directory: ~/plotly.js
7074
steps:
7175
- attach_workspace:
7276
at: ~/
7377
- run:
74-
name: Run jasmine tests (batch 3)
75-
command: ./.circleci/test.sh jasmine3
78+
name: Run jasmine tests (part C)
79+
command: .circleci/test.sh flaky-no-gl-jasmine
7680

77-
test-image:
78-
docker:
79-
- image: plotly/testbed:latest
81+
make-baselines:
8082
parallelism: 4
81-
working_directory: /var/www/streambed/image_server/plotly.js/
83+
docker:
84+
- image: circleci/python:3.8.9
85+
working_directory: ~/plotly.js
8286
steps:
8387
- attach_workspace:
84-
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
8598
- run:
86-
name: Run and setup container
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
104+
- run:
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
87112
command: |
88-
supervisord &
89-
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: ~/
90130
- run:
91-
name: Run image tests
92-
command: ./.circleci/test.sh image
131+
name: compare pixels
132+
command: .circleci/test.sh test-image ; find build -maxdepth 1 -type f -delete
93133
- store_artifacts:
94134
path: build
95135
destination: /
96136

97-
test-image2:
137+
make-exports:
98138
docker:
99-
- image: plotly/testbed:latest
100-
working_directory: /var/www/streambed/image_server/plotly.js/
139+
- image: circleci/python:3.8.9
140+
working_directory: ~/plotly.js
101141
steps:
102142
- attach_workspace:
103-
at: /var/www/streambed/image_server/
143+
at: ~/
104144
- run:
105-
name: Run and setup container
106-
command: |
107-
supervisord &
108-
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
156+
- run:
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: ~/
109171
- run:
110-
name: Run image tests
111-
command: ./.circleci/test.sh image2
172+
name: test export sizes
173+
command: node test/image/export_test.js ; find build -maxdepth 1 -type f -delete
112174
- store_artifacts:
113175
path: build
114176
destination: /
115177

116-
test-syntax:
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+
192+
source-syntax:
117193
docker:
118-
- image: circleci/node:12.13.0
194+
- image: circleci/node:12.22.1
119195
working_directory: ~/plotly.js
120196
steps:
121197
- attach_workspace:
122198
at: ~/
123199
- run:
124-
name: Run syntax tests
125-
command: ./.circleci/test.sh syntax
200+
name: Run syntax tests on source files
201+
command: .circleci/test.sh source-syntax
126202

127-
test-bundle:
203+
jasmine-bundle:
128204
docker:
129205
# need '-browsers' version to test in real (xvfb-wrapped) browsers
130-
- image: circleci/node:12.13.0-browsers
206+
- image: circleci/node:12.22.1-browsers
131207
working_directory: ~/plotly.js
132208
steps:
133209
- attach_workspace:
134210
at: ~/
135211
- run:
136-
name: Run test-bundle
137-
command: ./.circleci/test.sh bundle
212+
name: Run jasmine tests (part D)
213+
command: .circleci/test.sh jasmine-bundle
138214

139-
publish:
215+
publish-dist:
140216
docker:
141-
- image: circleci/node:12.13.0
217+
- image: circleci/node:12.22.1
142218
working_directory: ~/plotly.js
143219
steps:
144220
- attach_workspace:
@@ -166,33 +242,83 @@ jobs:
166242
echo https://$CIRCLE_BUILD_NUM-$PROJECT_NUM-gh.circle-artifacts.com/0/dist/plotly.js
167243
echo https://$CIRCLE_BUILD_NUM-$PROJECT_NUM-gh.circle-artifacts.com/0/dist/plotly.min.js
168244
echo https://$CIRCLE_BUILD_NUM-$PROJECT_NUM-gh.circle-artifacts.com/0/dist/plot-schema.json
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: ~/
257+
- run:
258+
name: Test plotly.min.js import using requirejs
259+
command: npm run test-requirejs
260+
- run:
261+
name: Test plotly bundles againt unexpected characters
262+
command: npm run no-bad-char
263+
- run:
264+
name: Test certain bundles against function constructors
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: ~/
274+
- run:
275+
name: Test plotly bundles against es6
276+
command: npm run no-es6-dist
277+
- run:
278+
name: Test plotly bundles againt duplicate keys
279+
command: npm run no-dup-keys
169280

170281
workflows:
171282
version: 2
172283
build-and-test:
173284
jobs:
174-
- build
175-
- test-bundle:
285+
- install-and-cibuild
286+
- jasmine-bundle:
287+
requires:
288+
- install-and-cibuild
289+
- no-gl-jasmine:
290+
requires:
291+
- install-and-cibuild
292+
- webgl-jasmine:
293+
requires:
294+
- install-and-cibuild
295+
- flaky-no-gl-jasmine:
296+
requires:
297+
- install-and-cibuild
298+
- make-baselines:
299+
requires:
300+
- install-and-cibuild
301+
- test-baselines:
176302
requires:
177-
- build
178-
- test-jasmine:
303+
- make-baselines
304+
- make-exports:
179305
requires:
180-
- build
181-
- test-jasmine2:
306+
- install-and-cibuild
307+
- test-exports:
182308
requires:
183-
- build
184-
- test-jasmine3:
309+
- make-exports
310+
- mock-validation:
185311
requires:
186-
- build
187-
- test-image:
312+
- install-and-cibuild
313+
- source-syntax:
188314
requires:
189-
- build
190-
- test-image2:
315+
- install-and-cibuild
316+
- publish-dist:
191317
requires:
192-
- build
193-
- test-syntax:
318+
- install-and-cibuild
319+
- test-dist1:
194320
requires:
195-
- build
196-
- publish:
321+
- publish-dist
322+
- test-dist2:
197323
requires:
198-
- build
324+
- publish-dist

0 commit comments

Comments
 (0)