Skip to content

Commit 79d8564

Browse files
committed
build: cache node_modules on Travis CI
1 parent 99f399b commit 79d8564

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

.travis.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,16 @@ node_js:
99
- "4.4"
1010
- "5.9"
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+
19+
# Update Node.js modules
20+
- "test ! -d node_modules || npm prune"
21+
- "test ! -d node_modules || npm rebuild"
1522
script:
1623
# Run test script, depending on istanbul install
1724
- "test ! -z $(npm -ps ls istanbul) || npm test"

0 commit comments

Comments
 (0)