Skip to content

Commit abddbac

Browse files
committed
ci: run travis jobs on different timezones
1 parent 26e5d6e commit abddbac

1 file changed

Lines changed: 36 additions & 29 deletions

File tree

.travis.yml

Lines changed: 36 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,42 @@
11
language: node_js
22

3-
cache:
4-
directories:
5-
- node_modules
6-
- browser-test/node_modules
7-
83
notifications:
94
email: false
105

116
node_js:
12-
- '8'
13-
- '9'
14-
- '10'
15-
- '11'
16-
17-
before_install:
18-
- export TZ=Europe/Paris
19-
20-
install:
21-
- npm i
22-
- cd browser-test && npm i && cd ..
23-
24-
script:
25-
- npm run test
26-
- node scripts/prepare-for-npm
27-
- npm run test:sauce || exit 0
28-
29-
deploy:
30-
on:
31-
branch: master
32-
tags: true
33-
provider: script
34-
skip_cleanup: true
35-
script: sh scripts/deploy.sh $TRAVIS_TAG
7+
- '12'
8+
9+
jobs:
10+
include:
11+
- name: "Sauce test"
12+
script: |
13+
node scripts/prepare-for-npm
14+
cd browser-test
15+
npm ci
16+
npm run sauce
17+
18+
- env: TZ=Asia/Tehran
19+
script: npm run test
20+
21+
- env: TZ=Europe/Paris
22+
script: npm run test
23+
24+
- env: TZ=Australia/Canberra
25+
script: npm run test
26+
27+
- env: TZ=America/Tijuana
28+
script: npm run test
29+
30+
- stage: deploy
31+
deploy:
32+
on:
33+
branch: master
34+
tags: true
35+
provider: script
36+
skip_cleanup: true
37+
script: |
38+
echo "Deploying to npm (node $(node -v), TZ $TZ)"
39+
date +'%D %T %:z (%Z)'
40+
node scripts/prepare-for-npm
41+
sh scripts/deploy.sh $TRAVIS_TAG
42+

0 commit comments

Comments
 (0)