Skip to content

Commit

Permalink
Merge pull request #582 from Automattic/feature/travis-add-retry
Browse files Browse the repository at this point in the history
Travis: retry composer install on failure
  • Loading branch information
GaryJones authored Sep 9, 2020
2 parents 92fb4a4 + b756e70 commit 05789f8
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
- ./bin/php-lint

# Add PHPCS locally for the XSD.
- composer require squizlabs/php_codesniffer
- travis_retry composer require squizlabs/php_codesniffer
# Validate the XML files and check the code-style consistency of the XML files.
- ./bin/xml-lint

Expand All @@ -62,7 +62,7 @@ jobs:
php: 7.4
env: PHPCS_BRANCH="dev-master"
before_install: phpenv config-rm xdebug.ini || echo 'No xdebug config.'
install: composer install --no-suggest
install: travis_retry composer install --no-suggest
script:
# Run PHPCS against VIPCS.
- ./bin/phpcs
Expand Down Expand Up @@ -96,14 +96,14 @@ before_install:
fi
install:
- composer require squizlabs/php_codesniffer:"$PHPCS_BRANCH" --no-update --no-suggest --no-scripts
- travis_retry composer require squizlabs/php_codesniffer:"$PHPCS_BRANCH" --no-update --no-suggest --no-scripts
- |
if [[ $TRAVIS_PHP_VERSION == "nightly" ]]; then
# PHPUnit 7.x does not allow for installation on PHP 8, so ignore platform
# requirements to get PHPUnit 7.x to install on nightly.
composer install --ignore-platform-reqs --no-suggest
# PHPUnit 7.x does not allow for installation on PHP 8, so ignore platform
# requirements to get PHPUnit 7.x to install on nightly.
travis_retry composer install --ignore-platform-reqs --no-suggest
else
composer install --no-suggest
travis_retry composer install --no-suggest
fi
script:
Expand Down

0 comments on commit 05789f8

Please sign in to comment.