Skip to content

Commit c63af81

Browse files
committed
ci: simpler travis and better stages
1 parent f447951 commit c63af81

File tree

1 file changed

+52
-31
lines changed

1 file changed

+52
-31
lines changed

.travis.yml

Lines changed: 52 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -12,46 +12,80 @@ env:
1212
global:
1313
- DBUS_SESSION_BUS_ADDRESS=/dev/null
1414

15+
16+
matrix:
17+
allow_failures:
18+
- env: nightly
19+
- env: ng2
20+
- node_js: "7"
21+
- node_js: "8"
22+
23+
1524
matrix:
1625
fast_finish: true
1726
allow_failures:
18-
- env: NODE_SCRIPT="tests/run_e2e.js --nightly --glob=tests/{build,test,misc}/**"
19-
- env: NODE_SCRIPT="tests/run_e2e.js --ng2 --glob=tests/{build,test,misc}/**"
27+
- env: nightly
28+
- env: ng2
2029
- node_js: "7"
2130
- node_js: "8"
2231
include:
32+
- stage: build
33+
script: npm run lint
34+
env: lint
35+
- script: npm run build
36+
env: build
37+
38+
- stage: test
39+
script: npm run test
40+
env: test
2341
- node_js: "6"
2442
os: linux
25-
env: SCRIPT=lint
26-
- node_js: "6"
27-
os: linux
28-
env: SCRIPT=build
29-
- node_js: "6"
30-
os: linux
31-
env: SCRIPT=test
32-
- node_js: "6"
33-
os: linux
34-
env: NODE_SCRIPT="tests/run_e2e.js --glob=tests/build/**"
43+
script: node tests/run_e2e.js "--glob=tests/build/**"
44+
env: build
3545
- node_js: "6"
3646
os: linux
37-
env: NODE_SCRIPT="tests/run_e2e.js --ignore=**/tests/build/**"
47+
script: node tests/run_e2e.js "--ignore=**/tests/build/**"
48+
env: e2e
3849
- node_js: "6"
3950
os: linux
40-
env: NODE_SCRIPT="tests/run_e2e.js --eject --glob=tests/build/**"
51+
script: node tests/run_e2e.js --eject "--glob=tests/build/**"
52+
env: eject
4153

4254
# Optional builds.
4355
- node_js: "6"
4456
os: linux
45-
env: NODE_SCRIPT="tests/run_e2e.js --ng2 --glob=tests/{build,test,misc}/**"
57+
script: node tests/run_e2e.js --ng2 "--glob=tests/{build,test,misc}/**"
58+
env: ng2
4659
- node_js: "6"
4760
os: linux
48-
env: NODE_SCRIPT="tests/run_e2e.js --nightly --glob=tests/{build,test,misc}/**"
61+
script: node tests/run_e2e.js "--nightly --glob=tests/{build,test,misc}/**"
62+
env: nightly
4963
- node_js: "7"
5064
os: linux
51-
env: NODE_SCRIPT="tests/run_e2e.js --glob=tests/{build,test,misc}/**"
65+
script: node tests/run_e2e.js "--glob=tests/{build,test,misc}/**"
66+
env: node7
5267
- node_js: "8"
5368
os: linux
54-
env: NODE_SCRIPT="tests/run_e2e.js --glob=tests/build/**"
69+
script: node tests/run_e2e.js "--glob=tests/build/**"
70+
env: node8
71+
72+
- stage: deploy
73+
script: skip
74+
env: builds
75+
deploy:
76+
- provider: script
77+
script: node scripts/git-builds.js
78+
on:
79+
all_branches: true
80+
- stage: deploy
81+
script: skip
82+
env: publish
83+
deploy:
84+
- provider: script
85+
script: node scripts/publish/publish.js
86+
on:
87+
tags: true
88+
5589

5690
before_install:
5791
# Use a virtual display.
@@ -67,10 +101,6 @@ before_install:
67101
install:
68102
- yarn --frozen-lockfile
69103

70-
script:
71-
- if [[ "$SCRIPT" ]]; then npm run-script $SCRIPT; fi
72-
- if [[ "$NODE_SCRIPT" ]]; then node $NODE_SCRIPT; fi
73-
74104
env:
75105
global:
76106
# GITHUB_ACCESS_TOKEN=<github token, a personal access token of the angular-builds account, account access in valentine>
@@ -80,12 +110,3 @@ env:
80110
- secure: "QDefZm9p3/SQ6ts0WVkzwr1qv4tvxpu5hB5ptTGQwRP02oPQumebE+uazSjhrbMf9zCnlrQSaCV7VxMdqQ0GUdAQ+gZz4mr/6SyT1eThTfgqq4GFX24M5dlcWW4rB6ot5NICPnsvASBVDn4IkapTY135/s5fqp2TeDJmAH8xMxKRbsG/b4+KCvhjpO7WJMZumkrwsWFrtAh1zFjrXoHwEySYPkwZceJmSi7GPmjZLodMmSkMxi4vuOAgrx6kWPTuCszKGXm7+Y1UbjeSSoBYLt2c19oy2dJKrER9sSx8/1yeV1C2JJ/cabYBktcn1svUh0lo1j1YOWtEXaIv7SRU694EtWxiuaL8iIcABHdoaLt/BZ34MLG0RdvFu0i2Bv5HxGWQg5TB/Jy502dqkep5ILofF80Ya9NTeapIPSbI3IEWcsCCw+t0pv/91XXU7mduDwtvBtzwxC4nKS4PITjrFTSrsr0wiLagW6ZCbKMrUitEFgedvsa3Tf8wVtt1s/Z7W2iLt81TTVdCei+46PtLIG3k9R1J78WmPLsGJ3uMXo/Cgc7q5PN66Dx6V1RZMBbS9xG0OPxd8a/6Lj94u6QWS1x50osVPEqUqGmT2tWP5fabrDKLUnVLm2Y0O1eBnnu9ew+ccCKou0FCqlx5ppRekBIaMibHbmgahRLMgNbaJR0="
81111

82112

83-
deploy:
84-
- provider: script
85-
script: node scripts/git-builds.js
86-
on:
87-
all_branches: true
88-
- provider: script
89-
script: node scripts/publish/publish.js
90-
on:
91-
tags: true

0 commit comments

Comments
 (0)