Skip to content

Commit e0a170b

Browse files
novemberbornsindresorhus
authored andcommitted
Speed up CI (#1076)
* 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.
1 parent 257b34d commit e0a170b

File tree

2 files changed

+14
-8
lines changed

2 files changed

+14
-8
lines changed

.travis.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
language: node_js
22
node_js:
33
- '6'
4-
- '5'
54
- '4'
65
- '0.12'
76
- '0.10'
7+
cache:
8+
directories:
9+
- $HOME/.npm
10+
- node_modules
811
before_install:
9-
- 'npm install -g npm@latest'
12+
- 'node -e "process.exit(Number(process.version.match(/^v(\d+)/)[1])>=6?0:1)" || npm install -g npm@3.x-latest'
13+
before_script:
14+
- npm prune
1015
after_success:
1116
- '[ -z "$COVERALLS_REPO_TOKEN" ] && tap --coverage-report=text-lcov | ./node_modules/.bin/coveralls'

appveyor.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,24 @@
11
environment:
22
matrix:
33
- nodejs_version: '6'
4-
- nodejs_version: '5'
54
- nodejs_version: '4'
65
- nodejs_version: '0.12'
76
install:
87
- ps: Install-Product node $env:nodejs_version
98
- set CI=true
109
- set AVA_APPVEYOR=true
11-
- npm install -g npm@latest || (timeout 30 && npm install -g npm@latest)
10+
- npm install -g npm@3.x-latest
1211
- set PATH=%APPDATA%\npm;%PATH%
13-
- npm install || (timeout 30 && npm install)
12+
- npm install
13+
- npm prune
1414
matrix:
1515
fast_finish: true
1616
build: off
17-
version: '{build}'
1817
shallow_clone: true
19-
clone_depth: 1
18+
cache:
19+
- node_modules
20+
- '%APPDATA%\npm-cache'
2021
test_script:
2122
- node --version
2223
- npm --version
23-
- npm run test-win || (timeout 30 && npm run test-win)
24+
- npm run test-win

0 commit comments

Comments
 (0)