Skip to content

Commit

Permalink
Speed up CI (#1076)
Browse files Browse the repository at this point in the history
* Stop testing Node.js v5

* Only upgrade npm when Travis runs Node.js older than v6

* Cache npm directories in Travis builds

* Stop retrying failed runs in Appveyor

Hopefully it's become more reliable since a73374d.

* Remove unnecessary clone_depth option from Appveyor

Per https://www.appveyor.com/docs/how-to/repository-shallow-clone/#downloading-repository-via-github-or-bitbucket-api

* Remove unnecessary version property from Appveyor

We're not building so the version isn't necessary.

* Cache npm directories in Appveyor builds

* Prune after npm install

Ensure top-level dependencies are indeed no longer available when
removed from the package.json.

* Ensure npm@3 for pre-v6 Node.js versions

Soon npm@latest will be npm@4. Let's stick to v3 for now.
  • Loading branch information
novemberborn authored and sindresorhus committed Oct 23, 2016
1 parent 257b34d commit e0a170b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
9 changes: 7 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
language: node_js
node_js:
- '6'
- '5'
- '4'
- '0.12'
- '0.10'
cache:
directories:
- $HOME/.npm
- node_modules
before_install:
- 'npm install -g npm@latest'
- 'node -e "process.exit(Number(process.version.match(/^v(\d+)/)[1])>=6?0:1)" || npm install -g npm@3.x-latest'
before_script:
- npm prune
after_success:
- '[ -z "$COVERALLS_REPO_TOKEN" ] && tap --coverage-report=text-lcov | ./node_modules/.bin/coveralls'
13 changes: 7 additions & 6 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
environment:
matrix:
- nodejs_version: '6'
- nodejs_version: '5'
- nodejs_version: '4'
- nodejs_version: '0.12'
install:
- ps: Install-Product node $env:nodejs_version
- set CI=true
- set AVA_APPVEYOR=true
- npm install -g npm@latest || (timeout 30 && npm install -g npm@latest)
- npm install -g npm@3.x-latest
- set PATH=%APPDATA%\npm;%PATH%
- npm install || (timeout 30 && npm install)
- npm install
- npm prune
matrix:
fast_finish: true
build: off
version: '{build}'
shallow_clone: true
clone_depth: 1
cache:
- node_modules
- '%APPDATA%\npm-cache'
test_script:
- node --version
- npm --version
- npm run test-win || (timeout 30 && npm run test-win)
- npm run test-win

0 comments on commit e0a170b

Please sign in to comment.