From 67b5b270f355ed91dac100a028cc8d36b5f6da6e Mon Sep 17 00:00:00 2001 From: Rodrigo Primo Date: Thu, 23 Aug 2018 16:20:41 -0300 Subject: [PATCH] Retry e2e tests automatically in case of failure Tests should be consistent. That is true for our unit tests suite, but it is something that is harded to achieve for functional tests. Our end to end tests often times fail due to factors outside of our control, and simply manually restarting the Travis build is enough to make them pass (example: https://github.com/woocommerce/woocommerce/pull/21150#issuecomment-415132390). This commits uses `travis_retry` to make Travis automatically retry a maximum of three times to run WC e2e tests in case of a failure. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 7c793307c34..38f5033cad8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -42,7 +42,7 @@ before_script: script: - bash tests/bin/phpunit.sh - bash tests/bin/phpcs.sh - - bash tests/bin/run-e2e-CI.sh + - travis_retry bash tests/bin/run-e2e-CI.sh after_script: - bash tests/bin/travis.sh after