Skip to content

Commit

Permalink
Merge pull request ubccr#34 from tyearke/meta/travis-npm-cache
Browse files Browse the repository at this point in the history
Travis: Cache npm cache directory instead of node_modules directories
  • Loading branch information
jpwhite4 authored Apr 11, 2017
2 parents d7558a2 + 83ba04e commit 6fac9dd
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 13 deletions.
11 changes: 0 additions & 11 deletions .travis.build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,21 +62,10 @@ fi

# Build tests require the corresponding version of Open XDMoD.
if [ "$TEST_SUITE" = "build" ] || [ "$TEST_SUITE" = "unit" ]; then
# If present, move Travis cache dirs out of the way.
xdmod_cache_exists="false"; [ -e ../xdmod ] && xdmod_cache_exists="true"
if "$xdmod_cache_exists"; then
mv ../xdmod ../xdmod-cache
fi

xdmod_branch="$TRAVIS_BRANCH"
echo "Cloning Open XDMoD branch '$xdmod_branch'"
git clone --depth=1 --branch="$xdmod_branch" https://github.com/ubccr/xdmod.git ../xdmod

# If present, move Travis cache dirs back in.
if "$xdmod_cache_exists"; then
mv ../xdmod-cache/etl/js/node_modules ../xdmod/etl/js/node_modules
fi

pushd ../xdmod
. .travis.install.sh
popd
Expand Down
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ env:
# Add dependency directories to the Travis cache
cache:
directories:
- node_modules
- ../xdmod/etl/js/node_modules
- $HOME/.npm
- $HOME/.composer/cache
- /tmp/pear/cache

Expand Down

0 comments on commit 6fac9dd

Please sign in to comment.