Skip to content

Fixup jasmine2 to have more consistent CI runs #3853

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
docker:
# need '-browsers' version to test in real (xvfb-wrapped) browsers
- image: circleci/node:10.9.0-browsers
parallelism: 2
parallelism: 3
working_directory: ~/plotly.js
steps:
- attach_workspace:
Expand All @@ -74,6 +74,18 @@ jobs:
name: Run jasmine tests (batch 3)
command: ./.circleci/test.sh jasmine3

test-jasmine4:
docker:
# need '-browsers' version to test in real (xvfb-wrapped) browsers
- image: circleci/node:10.9.0-browsers
working_directory: ~/plotly.js
steps:
- attach_workspace:
at: ~/
- run:
name: Run jasmine tests (batch 4)
command: ./.circleci/test.sh jasmine4

test-image:
docker:
- image: plotly/testbed:latest
Expand Down Expand Up @@ -184,6 +196,9 @@ workflows:
- test-jasmine3:
requires:
- build
- test-jasmine4:
requires:
- build
- test-image:
requires:
- build
Expand Down
25 changes: 22 additions & 3 deletions .circleci/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ set +o pipefail

ROOT=$(dirname $0)/..
EXIT_STATE=0
MAX_AUTO_RETRY=5
MAX_AUTO_RETRY=1

log () {
echo -e "\n$1"
Expand Down Expand Up @@ -44,16 +44,20 @@ case $1 in
jasmine)
set_tz

MAX_AUTO_RETRY=10

SUITE=$(circleci tests glob "$ROOT/test/jasmine/tests/*" | circleci tests split)
npm run test-jasmine -- $SUITE --skip-tags=gl,noCI,flaky --showSkipped || EXIT_STATE=$?
npm run test-jasmine -- $SUITE --skip-tags=dbgl,gl,noCI,flaky --showSkipped || EXIT_STATE=$?

exit $EXIT_STATE
;;

jasmine2)
set_tz

SHARDS=($(node $ROOT/tasks/shard_jasmine_tests.js --limit=5 --tag=gl | circleci tests split))
MAX_AUTO_RETRY=5

SHARDS=($(node $ROOT/tasks/shard_jasmine_tests.js --limit=1 --tag=gl | circleci tests split))
for s in ${SHARDS[@]}; do
retry npm run test-jasmine -- "$s" --tags=gl --skip-tags=noCI --showSkipped
done
Expand All @@ -64,6 +68,8 @@ case $1 in
jasmine3)
set_tz

MAX_AUTO_RETRY=5

SHARDS=($(node $ROOT/tasks/shard_jasmine_tests.js --limit=1 --tag=flaky | circleci tests split))

for s in ${SHARDS[@]}; do
Expand All @@ -73,6 +79,19 @@ case $1 in
exit $EXIT_STATE
;;

jasmine4)
set_tz

MAX_AUTO_RETRY=10

SHARDS=($(node $ROOT/tasks/shard_jasmine_tests.js --limit=1 --tag=dbgl | circleci tests split))
for s in ${SHARDS[@]}; do
retry npm run test-jasmine -- "$s" --tags=dbgl --skip-tags=noCI --showSkipped
done

exit $EXIT_STATE
;;

image)
SUITE=$(find $ROOT/test/image/mocks/ -type f -printf "%f\n" | circleci tests split)
npm run test-image -- $SUITE --filter || EXIT_STATE=$?
Expand Down
2 changes: 1 addition & 1 deletion tasks/test_syntax.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ assertES5();
// check for for focus and exclude jasmine blocks
function assertJasmineSuites() {
var BLACK_LIST = ['fdescribe', 'fit', 'xdescribe', 'xit'];
var TAGS = ['noCI', 'noCIdep', 'gl', 'flaky'];
var TAGS = ['noCI', 'noCIdep', 'gl', 'dbgl', 'flaky'];
var IT_ONLY_TAGS = ['gl', 'flaky'];
var logs = [];

Expand Down
Loading