Skip to content

Commit 860f839

Browse files
committed
[Tests] improve matrix; test on node 7 and 8; don’t run the linter more than once; disable sudo; enable fast finish
1 parent 469243b commit 860f839

File tree

2 files changed

+26
-7
lines changed

2 files changed

+26
-7
lines changed

.travis.yml

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,31 @@
11
language: node_js
22
node_js:
3-
- 4
4-
- 5
5-
- 6
3+
- "8"
4+
- "7"
5+
- "6"
6+
- "5"
7+
- "4"
68
cache:
79
yarn: true
810
directories:
911
- node_modules
1012
script:
11-
- npm run test:ci
13+
- if [ "${FLOW-}" = true ]; then npm run flow; fi
14+
- if [ "${LINT-}" = true ]; then npm run lint; fi
15+
- if [ "${TEST-}" = true ]; then npm run test:ci; fi
1216
after_success:
13-
- npm run coveralls
17+
- if [ "${TEST-}" = true ]; then npm run coveralls; fi
18+
sudo: false
19+
env:
20+
global:
21+
- TEST=true
22+
matrix:
23+
fast_finish: true
24+
include:
25+
- node_js: "node"
26+
env: FLOW=true TEST=false
27+
- node_js: "node"
28+
env: LINT=true TEST=false
29+
allow_failures:
30+
- node_js: "7"
31+
- node_js: "5"

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@
2525
"lint": "eslint --config .eslintrc src __tests__ __mocks__ scripts",
2626
"prepublish": "safe-publish-latest && npm run lint && npm run flow && npm run test && npm run build",
2727
"pretest": "npm run lint:fix && npm run flow",
28-
"test:ci": "npm test -- --ci --runInBand",
29-
"test": "jest --coverage __tests__/**/*"
28+
"test": "npm run jest",
29+
"test:ci": "npm run jest -- --ci --runInBand",
30+
"jest": "jest --coverage __tests__/**/*"
3031
},
3132
"devDependencies": {
3233
"babel-cli": "^6.24.1",

0 commit comments

Comments
 (0)