Skip to content

Commit

Permalink
Optimize travis a bit
Browse files Browse the repository at this point in the history
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
  • Loading branch information
QWp6t authored and retlehs committed Mar 11, 2016
1 parent 6efa099 commit b42c425
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b42c425

Please sign in to comment.