Skip to content

Commit

Permalink
[Tests] up to node v8.4; newer npm breaks on older node
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Aug 29, 2017
1 parent 5e1b200 commit 05ce701
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
13 changes: 11 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ language: node_js
os:
- linux
node_js:
- "8.1"
- "8.4"
- "7.10"
- "6.11"
- "5.12"
Expand All @@ -15,7 +15,7 @@ node_js:
- "0.8"
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'
- 'if [ "${TRAVIS_NODE_VERSION}" != "0.6" ] && [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then if [ "${TRAVIS_NODE_VERSION%${TRAVIS_NODE_VERSION#[0-9]}}" = "0" ] || [ "${TRAVIS_NODE_VERSION:0:4}" = "iojs" ]; then npm install -g npm@4.5 ; else npm install -g npm; fi; fi'
install:
- '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;'
script:
Expand All @@ -33,6 +33,14 @@ matrix:
env: PRETEST=true
- node_js: "node"
env: POSTTEST=true
- node_js: "4"
env: COVERAGE=true
- node_js: "8.3"
env: TEST=true ALLOW_FAILURE=true
- node_js: "8.2"
env: TEST=true ALLOW_FAILURE=true
- node_js: "8.1"
env: TEST=true ALLOW_FAILURE=true
- node_js: "8.0"
env: TEST=true ALLOW_FAILURE=true
- node_js: "7.9"
Expand Down Expand Up @@ -160,3 +168,4 @@ matrix:
allow_failures:
- os: osx
- env: TEST=true ALLOW_FAILURE=true
- env: COVERAGE=true
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@
"main": "index.js",
"scripts": {
"pretest": "npm run lint",
"tests-only": "node --es-staging --harmony test/index.js",
"tests-only": "node --es-staging --harmony test",
"test": "npm run tests-only",
"posttest": "npm run security",
"coverage": "covert test/index.js",
"coverage:quiet": "covert test/index.js --quiet",
"coverage": "covert test",
"lint": "npm run jscs && npm run eslint",
"jscs": "jscs *.js */*.js",
"eslint": "eslint *.js */*.js",
Expand Down

0 comments on commit 05ce701

Please sign in to comment.