Skip to content

Commit ff9f3cf

Browse files
authored
update stages and build matrices (#3308)
* optimize build stages and jobs * attempt to avoid $TARGET * run smoke tests across multiple node versions * define addons per-job * disable caching for smoke tests; avoid alias * disable caching for older node versions entirely * combine bundle / browser tests; do not run extra node 9 job Signed-off-by: Christopher Hiller <[email protected]>
1 parent f2560e7 commit ff9f3cf

File tree

4 files changed

+55
-64
lines changed

4 files changed

+55
-64
lines changed

.travis.yml

+47-43
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,60 @@
1-
# trusty dist provides a modern build chain (as opposed to 'precise' dist)
2-
# which absolves us from having to install compilers and stuff
3-
dist: trusty
1+
# these are executed in order. each must pass for the next to be run
2+
stages:
3+
- smoke # this ensures a "user" install works properly
4+
- lint # lint code and docs
5+
- test # all tests
46

7+
# defaults
58
language: node_js
9+
node_js: '9'
10+
cache:
11+
directories:
12+
- ~/.npm
13+
- node_modules
614

7-
matrix:
8-
fast_finish: true
15+
jobs:
16+
include:
17+
- script: COVERAGE=1 npm start test.node
18+
after_success: npm start coveralls
919

10-
before_install: scripts/travis-before-install.sh
20+
- &node
21+
script: npm start test.node
22+
node_js: '8'
23+
cache: false
1124

12-
before_script: scripts/travis-before-script.sh
25+
- <<: *node
26+
node_js: '6'
27+
28+
- <<: *node
29+
node_js: '4'
30+
31+
- script: npm start test.bundle test.browser
32+
before_script: mkdir -p .karma
33+
addons:
34+
artifacts:
35+
paths:
36+
- .karma/
37+
- ./mocha.js
38+
chrome: stable
39+
sauce_connect: true
1340

14-
jobs:
15-
include:
1641
- stage: lint
42+
script: npm start lint
43+
44+
- &smoke
45+
stage: smoke
46+
env: NPM_CONFIG_PRODUCTION=1
47+
script: ./bin/mocha --opts /dev/null --reporter spec test/sanity/sanity.spec.js
48+
cache: false
49+
50+
- <<: *smoke
1751
node_js: '8'
18-
env: TARGET=lint
19-
script: npm start $TARGET
20-
- stage: test
21-
node_js: '9'
22-
env: TARGET=test.node COVERAGE=true
23-
script: npm start $TARGET
24-
- node_js: '8'
25-
env: TARGET=test.node
26-
script: npm start $TARGET
27-
- node_js: '6'
28-
env: TARGET=test.node
29-
script: npm start $TARGET
30-
- node_js: '4'
31-
env: TARGET=test.node
32-
script: npm start $TARGET
33-
- node_js: '8'
34-
env: TARGET=test.browser
35-
script: npm start $TARGET
3652

37-
stages:
38-
- lint
39-
- test
53+
- <<: *smoke
54+
node_js: '6'
4055

41-
after_success: npm start coveralls
56+
- <<: *smoke
57+
node_js: '4'
4258

4359
notifications:
4460
email: false
@@ -49,15 +65,3 @@ notifications:
4965
- secure: rGMGYWBaZgEa9i997jJHKzjI8WxECqLi6BqsMhvstDq9EeTeXkZFVfz4r6G3Xugsk3tFwb/pDpiYo1OK36kA5arUJTCia51u4Wn+c7lHKcpef/vXztoyucvw6/jXdVm/FQz1jztYYbqdyAOWC2BV8gYvg5F8TpK05UGCe5R0bRA=
5066
on_success: change
5167
on_failure: always
52-
53-
addons:
54-
artifacts:
55-
paths:
56-
- .karma/
57-
- ./mocha.js
58-
sauce_connect: true
59-
chrome: stable
60-
cache:
61-
directories:
62-
- ~/.npm
63-
- node_modules

package-lock.json

+8-8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/travis-before-install.sh

-9
This file was deleted.

scripts/travis-before-script.sh

-4
This file was deleted.

0 commit comments

Comments
 (0)