Skip to content

Commit

Permalink
build: cache node_modules on Travis CI
Browse files Browse the repository at this point in the history
  • Loading branch information
dougwilson committed Apr 21, 2016
1 parent 597ad34 commit b113a21
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,15 @@ node_js:
- "4.4"
- "5.10"
sudo: false
cache:
directories:
- node_modules
before_install:
# Setup Node.js version-specific dependencies
- "test $TRAVIS_NODE_VERSION != '0.8' || npm rm --save-dev istanbul"
# Update Node.js modules
- "test ! -d node_modules || npm prune"
- "test ! -d node_modules || npm rebuild"
script:
# Run test script, depending on istanbul install
- "test ! -z $(npm -ps ls istanbul) || npm test"
Expand Down

0 comments on commit b113a21

Please sign in to comment.