Skip to content

Commit b38e4a8

Browse files
committed
test-bundle in a separate job, enable parallelism
1 parent 7e68a2e commit b38e4a8

File tree

3 files changed

+28
-5
lines changed

3 files changed

+28
-5
lines changed

.circleci/config.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ jobs:
4040
docker:
4141
# need '-browsers' version to test in real (xvfb-wrapped) browsers
4242
- image: circleci/node:10.9.0-browsers
43+
parallelism: 2
4344
working_directory: ~/plotly.js
4445
steps:
4546
- attach_workspace:
@@ -52,6 +53,7 @@ jobs:
5253
docker:
5354
# need '-browsers' version to test in real (xvfb-wrapped) browsers
5455
- image: circleci/node:10.9.0-browsers
56+
parallelism: 2
5557
working_directory: ~/plotly.js
5658
steps:
5759
- attach_workspace:
@@ -121,6 +123,18 @@ jobs:
121123
name: Run syntax tests
122124
command: ./.circleci/test.sh syntax
123125

126+
test-bundle:
127+
docker:
128+
# need '-browsers' version to test in real (xvfb-wrapped) browsers
129+
- image: circleci/node:10.9.0-browsers
130+
working_directory: ~/plotly.js
131+
steps:
132+
- attach_workspace:
133+
at: ~/
134+
- run:
135+
name: Run test-bundle
136+
command: ./.circleci/test.sh bundle
137+
124138
publish:
125139
docker:
126140
- image: circleci/node:10.9.0
@@ -157,6 +171,9 @@ workflows:
157171
build-and-test:
158172
jobs:
159173
- build
174+
- test-bundle:
175+
requires:
176+
- build
160177
- test-jasmine:
161178
requires:
162179
- build

.circleci/test.sh

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,16 @@ case $1 in
4444
jasmine)
4545
set_tz
4646

47-
npm run test-jasmine -- --skip-tags=gl,noCI,flaky || EXIT_STATE=$?
48-
npm run test-bundle || EXIT_STATE=$?
47+
SUITE=$(circleci tests glob "$ROOT/test/jasmine/tests/*" | circleci tests split)
48+
npm run test-jasmine -- $SUITE --skip-tags=gl,noCI,flaky || EXIT_STATE=$?
4949

5050
exit $EXIT_STATE
5151
;;
5252

5353
jasmine2)
5454
set_tz
5555

56-
SHARDS=($(node $ROOT/tasks/shard_jasmine_tests.js --tag=gl))
56+
SHARDS=($(node $ROOT/tasks/shard_jasmine_tests.js --tag=gl | circleci tests split))
5757

5858
for s in ${SHARDS[@]}; do
5959
retry npm run test-jasmine -- "$s" --tags=gl --skip-tags=noCI
@@ -65,7 +65,7 @@ case $1 in
6565
jasmine3)
6666
set_tz
6767

68-
SHARDS=($(node $ROOT/tasks/shard_jasmine_tests.js --tag=flaky))
68+
SHARDS=($(node $ROOT/tasks/shard_jasmine_tests.js --tag=flaky | circleci tests split))
6969

7070
for s in ${SHARDS[@]}; do
7171
retry npm run test-jasmine -- "$s" --tags=flaky --skip-tags=noCI
@@ -85,6 +85,12 @@ case $1 in
8585
exit $EXIT_STATE
8686
;;
8787

88+
bundle)
89+
set_tz
90+
npm run test-bundle || EXIT_STATE=$?
91+
exit $EXIT_STATE
92+
;;
93+
8894
syntax)
8995
npm run lint || EXIT_STATE=$?
9096
npm run test-syntax || EXIT_STATE=$?

test/jasmine/tests/sankey_test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -997,7 +997,7 @@ describe('sankey tests', function() {
997997
});
998998

999999
['node', 'link'].forEach(function(obj) {
1000-
it('should not output hover/unhover event data when ' + obj + '.hoverinfo is skip', function(done) {
1000+
it('@flaky should not output hover/unhover event data when ' + obj + '.hoverinfo is skip', function(done) {
10011001
var fig = Lib.extendDeep({}, mock);
10021002

10031003
Plotly.plot(gd, fig)

0 commit comments

Comments
 (0)