Skip to content

Commit

Permalink
Update & Optimize CI configs
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
RyanZim committed Jul 31, 2017
1 parent 9b5718c commit 5435252
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
16 changes: 9 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -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
5 changes: 3 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ environment:
# node.js
- nodejs_version: "4"
- nodejs_version: "6"
- nodejs_version: "8"

# Install scripts. (runs after repo cloning)
install:
Expand All @@ -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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 5435252

Please sign in to comment.