Skip to content

Commit

Permalink
[Tests] on node v9; use nvm install-latest-npm so new npm doesn…
Browse files Browse the repository at this point in the history
…’t break old node; pin included builds to LTS.
  • Loading branch information
ljharb committed Nov 1, 2017
1 parent 7ff6303 commit 1948c30
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
language: node_js
node_js:
- "9"
- "8"
- "7"
- "6"
- "5"
- "4"
before_install:
- 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ]; then npm install -g npm@1.3 ; elif [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then case "$(npm --version)" in 1.*) npm install -g npm@1.4.28 ;; 2.*) npm install -g npm@2 ;; esac ; fi'
- 'if [ "${TRAVIS_NODE_VERSION%${TRAVIS_NODE_VERSION#[0-9]}}" = "0" ] || [ "${TRAVIS_NODE_VERSION:0:4}" = "iojs" ]; then npm install -g npm@4.5 ; elif [ "${TRAVIS_NODE_VERSION}" != "0.6" ] && [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then npm install -g npm; fi'
- 'nvm install-latest-npm'
install:
- 'if [ -n "${PACKAGE-}" ]; then cd "packages/${PACKAGE}"; fi'
- 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ]; then nvm install 0.8 && npm install -g npm@1.3 && npm install -g npm@1.4.28 && npm install -g npm@2 && npm install && nvm use "${TRAVIS_NODE_VERSION}"; else npm install; fi;'
- '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;'
- 'if [ -n "${ESLINT}" ]; then npm install --no-save "eslint@${ESLINT}"; fi'
script:
- 'if [ -n "${PREPUBLISH-}" ]; then npm run pretravis && npm run prepublish && npm run posttravis; elif [ -n "${LINT-}" ]; then npm run lint; else npm run travis; fi'
Expand All @@ -22,13 +22,14 @@ env:
matrix:
fast_finish: true
include:
- node_js: "node"
- node_js: "lts/*"
env: PREPUBLISH=true ESLINT=4 PACKAGE=eslint-config-airbnb
- node_js: "node"
- node_js: "lts/*"
env: PREPUBLISH=true ESLINT=4 PACKAGE=eslint-config-airbnb-base
- node_js: "node"
- node_js: "lts/*"
env: LINT=true
allow_failures:
- node_js: "9"
- node_js: "7"
- node_js: "5"
- env: PREPUBLISH=true ESLINT=4 PACKAGE=eslint-config-airbnb
Expand Down

0 comments on commit 1948c30

Please sign in to comment.