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 5, 2016
1 parent 47c623c commit f4d209a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,16 @@ node_js:
- "3.3"
- "4.4"
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 f4d209a

Please sign in to comment.