Skip to content

Commit

Permalink
Cache npm packages installed on travis
Browse files Browse the repository at this point in the history
Signed-off-by: Jenny Lea <[email protected]>
  • Loading branch information
Brian Butz authored and textbook committed May 13, 2020
1 parent 49573a4 commit 4ee0aec
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ dist: bionic
cache:
directories:
- .bundler_cache
- .npm_cache

addons:
apt:
Expand All @@ -21,7 +22,7 @@ jobs:
- stage: "Test"
name: "All Tests"
script:
- docker run -v $TRAVIS_BUILD_DIR/.bundler_cache:/bundler_cache -v "$TRAVIS_BUILD_DIR":/postfacto -e BUNDLE_PATH=/bundler_cache postfacto/dev:2.6.3-12.6.0 /bin/bash -c "cd /postfacto && npm config set user 0 && npm config set unsafe-perm true && ./deps.sh && EPHEMERAL_CONTAINER=true ./test.sh"
- docker run -v $TRAVIS_BUILD_DIR/.npm_cache:/npm_cache -v $TRAVIS_BUILD_DIR/.bundler_cache:/bundler_cache -v "$TRAVIS_BUILD_DIR":/postfacto -e npm_config_cache=/npm_cache -e BUNDLE_PATH=/bundler_cache postfacto/dev:2.6.3-12.6.0 /bin/bash -c "cd /postfacto && npm config set user 0 && npm config set unsafe-perm true && ./deps.sh && EPHEMERAL_CONTAINER=true ./test.sh"
- stage: "Package"
- name: "Build & Deploy Docker"
script:
Expand Down

0 comments on commit 4ee0aec

Please sign in to comment.