From 5435252f37c951442344926bbcc0d3c8b1b8d00b Mon Sep 17 00:00:00 2001 From: RyanZim Date: Mon, 31 Jul 2017 14:33:03 -0400 Subject: [PATCH] Update & Optimize CI configs - Test on Node 8 - Only run unit tests on Appveyor - Optimize TravisCI builds to use the minimum number of containers while keeping the performance reasonable --- .travis.yml | 16 +++++++++------- appveyor.yml | 5 +++-- package.json | 2 +- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0cfd6a56..45752ef6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,16 +1,18 @@ sudo: false language: node_js -node_js: - - "4" - - "5" - - "6" - - "7" matrix: include: + - node_js: "4" + - node_js: "5" + # We run both lint and unit on Node 6 + - node_js: "6" + env: TEST_SUITE=test - node_js: "7" - env: TEST_SUITE=lint + # We run coverage on Node 8 + - node_js: "8" + env: TEST_SUITE=coverage env: - TEST_SUITE=unit script: npm run-script $TEST_SUITE after_success: - - if [ $TEST_SUITE = lint ]; then npm run coveralls; fi + - if [ $TEST_SUITE = coverage ]; then npm run coveralls; fi diff --git a/appveyor.yml b/appveyor.yml index 8aeb13b1..6c768eda 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -4,6 +4,7 @@ environment: # node.js - nodejs_version: "4" - nodejs_version: "6" + - nodejs_version: "8" # Install scripts. (runs after repo cloning) install: @@ -18,8 +19,8 @@ test_script: # Output useful info for debugging. - node --version - npm --version - # run tests - - npm test + # run only unit tests; travis does the linting + - npm run unit # Don't actually build. build: off diff --git a/package.json b/package.json index 25868126..f526e829 100644 --- a/package.json +++ b/package.json @@ -55,7 +55,7 @@ "main": "./lib/index", "scripts": { "coverage": "istanbul cover -i 'lib/**' -x '**/__tests__/**' test.js", - "coveralls": "npm run coverage && coveralls < coverage/lcov.info", + "coveralls": "coveralls < coverage/lcov.info", "lint": "standard && standard-markdown", "test-find": "find ./lib/**/__tests__ -name *.test.js | xargs mocha", "test": "npm run lint && npm run unit",