Skip to content

Commit b9be8c1

Browse files
committed
Merge remote-tracking branch 'origin/master' into new-d3-geo
2 parents d5d352c + c783c33 commit b9be8c1

File tree

1,572 files changed

+711784
-408703
lines changed

Some content is hidden

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

1,572 files changed

+711784
-408703
lines changed

.circleci/config.yml

Lines changed: 107 additions & 51 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,45 +40,45 @@ 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+
no-gl-flaky-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 no-gl-flaky-jasmine
7680

77-
test-image:
81+
stable-image:
7882
docker:
7983
- image: plotly/testbed:latest
8084
parallelism: 4
@@ -88,13 +92,13 @@ jobs:
8892
supervisord &
8993
npm run docker -- setup
9094
- run:
91-
name: Run image tests
92-
command: ./.circleci/test.sh image
95+
name: Run image tests (part A)
96+
command: ./.circleci/test.sh stable-image ; find build -maxdepth 1 -type f -delete
9397
- store_artifacts:
9498
path: build
9599
destination: /
96100

97-
test-image2:
101+
flaky-image:
98102
docker:
99103
- image: plotly/testbed:latest
100104
working_directory: /var/www/streambed/image_server/plotly.js/
@@ -107,38 +111,52 @@ jobs:
107111
supervisord &
108112
npm run docker -- setup
109113
- run:
110-
name: Run image tests
111-
command: ./.circleci/test.sh image2
114+
name: Run image tests (part B)
115+
command: ./.circleci/test.sh flaky-image ; find build -maxdepth 1 -type f -delete
112116
- store_artifacts:
113117
path: build
114118
destination: /
115119

116-
test-syntax:
120+
mock-validation:
121+
docker:
122+
- image: circleci/node:12.22.1
123+
working_directory: ~/plotly.js
124+
steps:
125+
- attach_workspace:
126+
at: ~/
127+
- run:
128+
name: Test validation using node.js and jsdom
129+
command: npm run test-plain-obj
130+
- run:
131+
name: Validate mocks
132+
command: npm run test-mock
133+
134+
source-syntax:
117135
docker:
118-
- image: circleci/node:12.13.0
136+
- image: circleci/node:12.22.1
119137
working_directory: ~/plotly.js
120138
steps:
121139
- attach_workspace:
122140
at: ~/
123141
- run:
124-
name: Run syntax tests
125-
command: ./.circleci/test.sh syntax
142+
name: Run syntax tests on source files
143+
command: ./.circleci/test.sh source-syntax
126144

127-
test-bundle:
145+
jasmine-bundle:
128146
docker:
129147
# need '-browsers' version to test in real (xvfb-wrapped) browsers
130-
- image: circleci/node:12.13.0-browsers
148+
- image: circleci/node:12.22.1-browsers
131149
working_directory: ~/plotly.js
132150
steps:
133151
- attach_workspace:
134152
at: ~/
135153
- run:
136-
name: Run test-bundle
137-
command: ./.circleci/test.sh bundle
154+
name: Run jasmine tests (part D)
155+
command: ./.circleci/test.sh jasmine-bundle
138156

139-
publish:
157+
publish-dist:
140158
docker:
141-
- image: circleci/node:12.13.0
159+
- image: circleci/node:12.22.1
142160
working_directory: ~/plotly.js
143161
steps:
144162
- attach_workspace:
@@ -166,39 +184,77 @@ jobs:
166184
echo https://$CIRCLE_BUILD_NUM-$PROJECT_NUM-gh.circle-artifacts.com/0/dist/plotly.js
167185
echo https://$CIRCLE_BUILD_NUM-$PROJECT_NUM-gh.circle-artifacts.com/0/dist/plotly.min.js
168186
echo https://$CIRCLE_BUILD_NUM-$PROJECT_NUM-gh.circle-artifacts.com/0/dist/plot-schema.json
187+
- persist_to_workspace:
188+
root: ~/
189+
paths:
190+
- plotly.js
191+
192+
test-dist1:
193+
docker:
194+
- image: circleci/node:12.22.1
195+
working_directory: ~/plotly.js
196+
steps:
197+
- attach_workspace:
198+
at: ~/
169199
- run:
170-
name: Test certain bundles against function constructors
171-
command: npm run no-new-func
200+
name: Test plotly.min.js import using requirejs
201+
command: npm run test-requirejs
172202
- run:
173203
name: Test plotly bundles againt unexpected characters
174204
command: npm run no-bad-char
205+
- run:
206+
name: Test certain bundles against function constructors
207+
command: npm run no-new-func
208+
209+
test-dist2:
210+
docker:
211+
- image: circleci/node:12.22.1
212+
working_directory: ~/plotly.js
213+
steps:
214+
- attach_workspace:
215+
at: ~/
216+
- run:
217+
name: Test plotly bundles against es6
218+
command: npm run no-es6-dist
219+
- run:
220+
name: Test plotly bundles againt duplicate keys
221+
command: npm run no-dup-keys
175222

176223
workflows:
177224
version: 2
178225
build-and-test:
179226
jobs:
180-
- build
181-
- test-bundle:
227+
- install-and-cibuild
228+
- jasmine-bundle:
229+
requires:
230+
- install-and-cibuild
231+
- no-gl-jasmine:
232+
requires:
233+
- install-and-cibuild
234+
- webgl-jasmine:
235+
requires:
236+
- install-and-cibuild
237+
- no-gl-flaky-jasmine:
182238
requires:
183-
- build
184-
- test-jasmine:
239+
- install-and-cibuild
240+
- stable-image:
185241
requires:
186-
- build
187-
- test-jasmine2:
242+
- install-and-cibuild
243+
- flaky-image:
188244
requires:
189-
- build
190-
- test-jasmine3:
245+
- install-and-cibuild
246+
- mock-validation:
191247
requires:
192-
- build
193-
- test-image:
248+
- install-and-cibuild
249+
- source-syntax:
194250
requires:
195-
- build
196-
- test-image2:
251+
- install-and-cibuild
252+
- publish-dist:
197253
requires:
198-
- build
199-
- test-syntax:
254+
- install-and-cibuild
255+
- test-dist1:
200256
requires:
201-
- build
202-
- publish:
257+
- publish-dist
258+
- test-dist2:
203259
requires:
204-
- build
260+
- publish-dist

.circleci/test.sh

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,28 +41,29 @@ set_tz () {
4141

4242
case $1 in
4343

44-
jasmine)
44+
no-gl-jasmine)
4545
set_tz
4646

4747
SUITE=$(circleci tests glob "$ROOT/test/jasmine/tests/*" | circleci tests split)
48-
npm run test-jasmine -- $SUITE --skip-tags=gl,noCI,flaky || EXIT_STATE=$?
48+
MAX_AUTO_RETRY=2
49+
retry npm run test-jasmine -- $SUITE --skip-tags=gl,noCI,flaky || EXIT_STATE=$?
4950

5051
exit $EXIT_STATE
5152
;;
5253

53-
jasmine2)
54+
webgl-jasmine)
5455
set_tz
5556

5657
SHARDS=($(node $ROOT/tasks/shard_jasmine_tests.js --limit=5 --tag=gl | circleci tests split))
5758
for s in ${SHARDS[@]}; do
58-
MAX_AUTO_RETRY=1
59+
MAX_AUTO_RETRY=2
5960
retry npm run test-jasmine -- "$s" --tags=gl --skip-tags=noCI --doNotFailOnEmptyTestSuite
6061
done
6162

6263
exit $EXIT_STATE
6364
;;
6465

65-
jasmine3)
66+
no-gl-flaky-jasmine)
6667
set_tz
6768

6869
SHARDS=($(node $ROOT/tasks/shard_jasmine_tests.js --limit=1 --tag=flaky | circleci tests split))
@@ -75,26 +76,26 @@ case $1 in
7576
exit $EXIT_STATE
7677
;;
7778

78-
image)
79+
stable-image)
7980
SUITE=$(find $ROOT/test/image/mocks/ -type f -printf "%f\n" | circleci tests split)
8081
npm run test-image -- $SUITE --filter --skip-flaky || EXIT_STATE=$?
8182
exit $EXIT_STATE
8283
;;
8384

84-
image2)
85+
flaky-image)
8586
MAX_AUTO_RETRY=5
8687
retry npm run test-image -- --just-flaky
8788
npm run test-export || EXIT_STATE=$?
8889
exit $EXIT_STATE
8990
;;
9091

91-
bundle)
92+
jasmine-bundle)
9293
set_tz
9394
npm run test-bundle || EXIT_STATE=$?
9495
exit $EXIT_STATE
9596
;;
9697

97-
syntax)
98+
source-syntax)
9899
npm run lint || EXIT_STATE=$?
99100
npm run test-syntax || EXIT_STATE=$?
100101
exit $EXIT_STATE

.eslintignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ node_modules
22
dist
33
build
44

5+
tasks/test_requirejs.js
56
test/jasmine/assets/jquery-1.8.3.min.js
6-
src/plots/polar/legacy/micropolar.js

0 commit comments

Comments
 (0)