From 6e97a21276cf448ce424fb9ea13edd4587f289f1 Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Wed, 11 Oct 2017 00:53:36 -0700 Subject: [PATCH] [Tests] on all node minors; use `nvm install-latest-npm`; fix scripts; improve matrix --- .travis.yml | 190 ++++++++++++++++++++++++++++++++++++++++++++------- package.json | 7 +- 2 files changed, 169 insertions(+), 28 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4c29ed5..f86ed77 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,58 +1,198 @@ language: node_js +os: + - linux node_js: - - "4.1" - - "4.0" + - "8.6" + - "7.10" + - "6.11" + - "5.12" + - "4.8" - "iojs-v3.3" - - "iojs-v3.2" - - "iojs-v3.1" - - "iojs-v3.0" - "iojs-v2.5" - - "iojs-v2.4" - - "iojs-v2.3" - - "iojs-v2.2" - - "iojs-v2.1" - - "iojs-v2.0" - "iojs-v1.8" - - "iojs-v1.7" - - "iojs-v1.6" - - "iojs-v1.5" - - "iojs-v1.4" - - "iojs-v1.3" - - "iojs-v1.2" - - "iojs-v1.1" - - "iojs-v1.0" - "0.12" - - "0.11" - "0.10" - - "0.9" - "0.8" - - "0.6" - - "0.4" before_install: - - '[ "${TRAVIS_NODE_VERSION}" = "0.6" ] || npm install -g npm@1.4.28 && npm install -g npm' + - '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 "${COVERAGE-}" ]; then npm run coverage ; fi' + - 'if [ -n "${TEST-}" ]; then npm run tests-only ; fi' sudo: false +env: + - TEST=true matrix: fast_finish: true - allow_failures: + include: + - node_js: "node" + env: PRETEST=true + - node_js: "node" + env: POSTTEST=true + - node_js: "4" + env: COVERAGE=true + - node_js: "8.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.4" + env: TEST=true ALLOW_FAILURE=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" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.10" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.11" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.10" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.1" + env: TEST=true ALLOW_FAILURE=true - node_js: "4.0" + env: TEST=true ALLOW_FAILURE=true - node_js: "iojs-v3.2" + env: TEST=true ALLOW_FAILURE=true - node_js: "iojs-v3.1" + env: TEST=true ALLOW_FAILURE=true - node_js: "iojs-v3.0" + env: TEST=true ALLOW_FAILURE=true - node_js: "iojs-v2.4" + env: TEST=true ALLOW_FAILURE=true - node_js: "iojs-v2.3" + env: TEST=true ALLOW_FAILURE=true - node_js: "iojs-v2.2" + env: TEST=true ALLOW_FAILURE=true - node_js: "iojs-v2.1" + env: TEST=true ALLOW_FAILURE=true - node_js: "iojs-v2.0" + env: TEST=true ALLOW_FAILURE=true - node_js: "iojs-v1.7" + env: TEST=true ALLOW_FAILURE=true - node_js: "iojs-v1.6" + env: TEST=true ALLOW_FAILURE=true - node_js: "iojs-v1.5" + env: TEST=true ALLOW_FAILURE=true - node_js: "iojs-v1.4" + env: TEST=true ALLOW_FAILURE=true - node_js: "iojs-v1.3" + env: TEST=true ALLOW_FAILURE=true - node_js: "iojs-v1.2" + env: TEST=true ALLOW_FAILURE=true - node_js: "iojs-v1.1" + env: TEST=true ALLOW_FAILURE=true - node_js: "iojs-v1.0" + env: TEST=true ALLOW_FAILURE=true - node_js: "0.11" + env: TEST=true ALLOW_FAILURE=true - node_js: "0.9" - - node_js: "0.8" + env: TEST=true ALLOW_FAILURE=true - node_js: "0.6" + env: TEST=true ALLOW_FAILURE=true - node_js: "0.4" + env: TEST=true ALLOW_FAILURE=true + ##- node_js: "7" + #env: TEST=true + #os: osx + #- node_js: "6" + #env: TEST=true + #os: osx + #- node_js: "5" + #env: TEST=true + #os: osx + #- node_js: "4" + #env: TEST=true + #os: osx + #- node_js: "iojs" + #env: TEST=true + #os: osx + #- node_js: "0.12" + #env: TEST=true + #os: osx + #- node_js: "0.10" + #env: TEST=true + #os: osx + #- node_js: "0.8" + #env: TEST=true + #os: osx + allow_failures: + - os: osx + - env: TEST=true ALLOW_FAILURE=true + - env: COVERAGE=true diff --git a/package.json b/package.json index 74ea764..35d8967 100644 --- a/package.json +++ b/package.json @@ -6,9 +6,11 @@ "license": "MIT", "main": "index.js", "scripts": { - "test": "npm run lint && node --harmony --es-staging test.js && npm run security", + "pretest": "npm run lint", + "test": "npm run tests-only", + "tests-only": "node --harmony --es-staging test", + "posttest": "npm run security", "coverage": "covert test.js", - "coverage-quiet": "covert test.js --quiet", "lint": "npm run jscs && npm run eslint", "jscs": "jscs test.js *.js", "eslint": "eslint test.js *.js", @@ -60,4 +62,3 @@ "node": ">= 0.4" } } -