From b42c425e5c247963ecaedce4bc7a2bdfc3bca38a Mon Sep 17 00:00:00 2001 From: QWp6t Date: Wed, 6 Jan 2016 23:11:38 -0800 Subject: [PATCH] Optimize travis a bit 1. Add apt and composer's cache folder to travis cache 2. Use --prefer-dist to avoid cloning repos 3. Use --no-interaction to inform composer that prompts should be suppressed 4. Use travis_retry to resolve occasional network failures/timeouts --- .travis.yml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9d929a3930..1146f23d81 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,23 +23,25 @@ addons: - g++-4.8 cache: + apt: true directories: + - $HOME/.composer/cache - bower_components - node_modules - vendor install: - source ~/.nvm/nvm.sh && nvm install $TRAVIS_NODE_VERSION - - npm install -g npm@latest - - npm install -g bower gulp eslint + - travis_retry npm install -g npm@latest + - travis_retry npm install -g bower gulp eslint - node -v && npm -v && bower -v && gulp -v - npm rebuild - - npm install - - composer self-update && composer --version + - travis_retry npm install + - travis_retry composer self-update && composer --version - export PATH="$HOME/.composer/vendor/bin:$PATH" - - composer global require squizlabs/php_codesniffer - - composer global require phpmd/phpmd - - composer install -o + - travis_retry composer global require squizlabs/php_codesniffer --prefer-dist + - travis_retry composer global require phpmd/phpmd --prefer-dist + - travis_retry composer install -o --prefer-dist --no-interaction script: - npm run build