Skip to content

Commit

Permalink
[Tests] update travis-ci config
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Nov 23, 2017
1 parent e2fa2c0 commit 1769b19
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 7 deletions.
42 changes: 36 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,38 @@
sudo: false
language: node_js
os:
- linux
node_js:
- stable
branches:
only:
- master
- /^greenkeeper-/
- "9"
- "8"
- "7"
- "6"
- "5"
- "4"
before_install:
- 'nvm install-latest-npm'
install:
- '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;'
script:
- 'if [ -n "${PRETEST-}" ]; then npm run pretest ; fi'
- 'if [ -n "${POSTTEST-}" ]; then npm run posttest ; fi'
- 'if [ -n "${KARMA-}" ]; then npm run karma ; fi'
- 'if [ -n "${COVERAGE-}" ]; then npm run coverage ; fi'
- 'if [ -n "${TEST-}" ]; then npm run tests-only ; fi'
sudo: false
env:
- TEST=true
matrix:
fast_finish: true
include:
- node_js: "lts/*"
env: PRETEST=true
- node_js: "lts/*"
env: KARMA=true
allow_failures:
- os: osx
- env: TEST=true ALLOW_FAILURE=true
- env: COVERAGE=true
- env: KARMA=true
- node_js: "9"
- node_js: "7"
- node_js: "5"
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
"build-min": "webpack -p modules/index.js umd/expect.min.js",
"lint": "eslint modules",
"pretest": "npm run lint",
"test": "npm run jest",
"test": "npm run tests-only",
"tests-only": "npm run jest",
"jest": "jest",
"posttest": "npm run karma",
"karma": "karma start",
Expand Down

0 comments on commit 1769b19

Please sign in to comment.