Skip to content

Commit 5494b95

Browse files
committed
[Tests] improve the travis matrix
1 parent 153f682 commit 5494b95

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

.travis.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
language: node_js
2+
os:
3+
- linux
24
node_js:
35
- "12"
46
- "10"
@@ -12,3 +14,21 @@ cache:
1214
- node_modules
1315
after_success:
1416
- npm run coveralls
17+
before_install:
18+
- 'case "${TRAVIS_NODE_VERSION}" in 0.*) export NPM_CONFIG_STRICT_SSL=false ;; esac'
19+
- 'nvm install-latest-npm'
20+
install:
21+
- 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ] || [ "${TRAVIS_NODE_VERSION}" = "0.9" ]; then nvm install --latest-npm 0.8 && npm install && nvm use "${TRAVIS_NODE_VERSION}"; else npm install; fi;'
22+
script:
23+
- 'if [ -n "${PRETEST-}" ]; then npm run pretest ; fi'
24+
- 'if [ -n "${TEST-}" ]; then npm run tests-only ; fi'
25+
sudo: false
26+
env:
27+
- TEST=true
28+
matrix:
29+
fast_finish: true
30+
include:
31+
- node_js: "lts/*"
32+
env: PRETEST=true
33+
allow_failures:
34+
- os: osx

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
"coveralls": "cat ./reports/lcov.info | coveralls",
1111
"lint": "eslint .",
1212
"pretest": "npm run lint",
13-
"test": "jest --coverage",
13+
"test": "npm run tests-only --",
14+
"tests-only": "jest --coverage",
1415
"test:watch": "npm test -- --watch"
1516
},
1617
"devDependencies": {

0 commit comments

Comments
 (0)