Skip to content

Commit

Permalink
Travis: retry composer install on failure
Browse files Browse the repository at this point in the history
The builds are failing a little too often for my taste on the below error.
```
[Composer\Downloader\TransportException]
Peer fingerprint did not match
```

I'm prefixing the `composer install` commands now with `travis_retry` in an attempt to get round this problem.

Ref:
* https://docs.travis-ci.com/user/common-build-problems/#timeouts-installing-dependencies
  • Loading branch information
jrfnl committed Sep 1, 2020
1 parent 85f3521 commit 4dbd3a9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ before_install:
# PHPUnit 8.x is not (yet) supported, so prevent issues with Travis images using it.
- |
if [[ $TRAVIS_PHP_VERSION != "nightly" ]]; then
composer install
travis_retry composer install
elif [[ $TRAVIS_PHP_VERSION == "nightly" ]]; then
// Allow installing "incompatible" PHPUnit version on PHP 8/nightly.
composer install --ignore-platform-reqs
travis_retry composer install --ignore-platform-reqs
fi
before_script:
Expand Down

0 comments on commit 4dbd3a9

Please sign in to comment.