Build/Test Tools: Implement the automatic retry functionality that Travis CI provides.
This functionality will cause the command to be retried up to three times in case of a non-zero return value. Implementing it on commands that perform network requests means that intermittent network failures are less likely to cause a build to fail, as they'll be retried up to three times. See #44858 git-svn-id: https://develop.svn.wordpress.org/trunk@43645 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
3493feaa5a
commit
629c76c31b
|
@ -41,7 +41,7 @@ before_install:
|
|||
sed -i "s/youremptytestdbnamehere/wordpress_tests/" wp-tests-config.php
|
||||
sed -i "s/yourusernamehere/root/" wp-tests-config.php
|
||||
sed -i "s/yourpasswordhere//" wp-tests-config.php
|
||||
svn checkout https://plugins.svn.wordpress.org/wordpress-importer/tags/0.6.3/ tests/phpunit/data/plugins/wordpress-importer
|
||||
travis_retry svn checkout https://plugins.svn.wordpress.org/wordpress-importer/tags/0.6.3/ tests/phpunit/data/plugins/wordpress-importer
|
||||
fi
|
||||
- |
|
||||
if [[ "$WP_TRAVIS_OBJECT_CACHE" == "true" ]]; then
|
||||
|
@ -68,11 +68,11 @@ before_script:
|
|||
case "$TRAVIS_PHP_VERSION" in
|
||||
7.2|7.1|7.0|nightly)
|
||||
echo "Using PHPUnit 6.x"
|
||||
composer global require "phpunit/phpunit:^6"
|
||||
travis_retry composer global require "phpunit/phpunit:^6"
|
||||
;;
|
||||
5.6|5.5|5.4|5.3)
|
||||
echo "Using PHPUnit 4.x"
|
||||
composer global require "phpunit/phpunit:^4"
|
||||
travis_retry composer global require "phpunit/phpunit:^4"
|
||||
;;
|
||||
5.2)
|
||||
# Do nothing, use default PHPUnit 3.6.x
|
||||
|
@ -88,7 +88,7 @@ before_script:
|
|||
# We only need to run composer install on the code formatting job.
|
||||
if [[ "$WP_TRAVISCI" == "travis:format" ]]; then
|
||||
composer --version
|
||||
composer install
|
||||
travis_retry composer install
|
||||
fi
|
||||
- npm --version
|
||||
- node --version
|
||||
|
|
Loading…
Reference in New Issue