From df377850cf14db9f606f89cd9d87076046969b7f Mon Sep 17 00:00:00 2001 From: Jonathan Hartman Date: Thu, 4 Feb 2016 22:35:18 -0800 Subject: [PATCH] Cache the downloaded .cvd files in Travis --- .travis.yml | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index fd9441a..e3cc406 100755 --- a/.travis.yml +++ b/.travis.yml @@ -9,15 +9,22 @@ sudo: required services: - docker +cache: + directories: + - test/cookbooks/clamav_test/files + +env: + - CVD_PATH=test/cookbooks/clamav_test/files + install: - curl -L https://www.chef.io/chef/install.sh | sudo bash -s -- -P chefdk - chef exec bundle install --without=development integration before_script: - - mkdir -p test/cookbooks/clamav_test/files - - wget -P test/cookbooks/clamav_test/files http://database.clamav.net/main.cvd - - wget -P test/cookbooks/clamav_test/files http://database.clamav.net/daily.cvd - - wget -P test/cookbooks/clamav_test/files http://database.clamav.net/bytecode.cvd + - mkdir -p $CVD_PATH + - "[ -e $CVD_PATH/main.cvd ] || wget -P $CVD_PATH http://database.clamav.net/main.cvd" + - "[ -e $CVD_PATH/daily.cvd ] || wget -P $CVD_PATH http://database.clamav.net/daily.cvd" + - "[ -e $CVD_PATH/bytecode.cvd ] || wget -P $CVD_PATH http://database.clamav.net/bytecode.cvd" - cp .kitchen.travis.yml .kitchen.local.yml script: