Skip to content

Commit b113a21

Browse files
committed
build: cache node_modules on Travis CI
1 parent 597ad34 commit b113a21

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

.travis.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,15 @@ node_js:
99
- "4.4"
1010
- "5.10"
1111
sudo: false
12+
cache:
13+
directories:
14+
- node_modules
1215
before_install:
1316
# Setup Node.js version-specific dependencies
1417
- "test $TRAVIS_NODE_VERSION != '0.8' || npm rm --save-dev istanbul"
18+
# Update Node.js modules
19+
- "test ! -d node_modules || npm prune"
20+
- "test ! -d node_modules || npm rebuild"
1521
script:
1622
# Run test script, depending on istanbul install
1723
- "test ! -z $(npm -ps ls istanbul) || npm test"

0 commit comments

Comments
 (0)