Skip to content

Commit

Permalink
move timezone setup to test.sh
Browse files Browse the repository at this point in the history
... so that env variable can be accessed by jasmine tests
  • Loading branch information
etpinard committed Aug 23, 2018
1 parent 9c63701 commit f4f95f5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
10 changes: 0 additions & 10 deletions .circleci/config.yml
Expand Up @@ -53,11 +53,6 @@ jobs:
- checkout
- attach_workspace:
at: ~/plotly.js
- run:
name: Set timezone to Alaska time (arbitrary timezone to test date logic)
command: |
sudo cp /usr/share/zoneinfo/America/Anchorage /etc/localtime
export TZ='America/Anchorage'
- run:
name: Run jasmine tests (batch 1)
command: ./.circleci/test.sh jasmine
Expand All @@ -71,11 +66,6 @@ jobs:
- checkout
- attach_workspace:
at: ~/plotly.js
- run:
name: Set timezone to Alaska time (arbitrary timezone to test date logic)
command: |
sudo cp /usr/share/zoneinfo/America/Anchorage /etc/localtime
export TZ='America/Anchorage'
- run:
name: Run jasmine tests (batch 2)
command: ./.circleci/test.sh jasmine2
Expand Down
11 changes: 11 additions & 0 deletions .circleci/test.sh
Expand Up @@ -33,16 +33,27 @@ retry () {
fi
}

# set timezone to Alaska time (arbitrary timezone to test date logic)
set_tz () {
sudo cp /usr/share/zoneinfo/America/Anchorage /etc/localtime
export TZ='America/Anchorage'
}

case $1 in

jasmine)
set_tz

npm run test-jasmine -- --skip-tags=gl,noCI,flaky || EXIT_STATE=$?
retry npm run test-jasmine -- --tags=flaky --skip-tags=noCI
npm run test-bundle || EXIT_STATE=$?

exit $EXIT_STATE
;;

jasmine2)
set_tz

SHARDS=($(node $ROOT/tasks/shard_jasmine_tests.js --tag=gl))

for s in ${SHARDS[@]}; do
Expand Down

0 comments on commit f4f95f5

Please sign in to comment.