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 Mar 20, 2016
1 parent 110131c commit 7b3da41
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 @@ -9,6 +9,9 @@ node_js:
- "4.4"
- "5.0"
sudo: false
cache:
directories:
- node_modules
before_install:
# Remove all non-test dependencies
- "npm rm --save-dev benchmark"
Expand All @@ -17,6 +20,10 @@ 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 7b3da41

Please sign in to comment.