Only retry failing QA tests in CI

No need to retry automatically when running tests locally
This commit is contained in:
Mark Lapierre 2019-05-07 12:49:39 +10:00
parent a4777d6ea9
commit ff6aa7906e
1 changed files with 5 additions and 3 deletions

View File

@ -35,8 +35,10 @@ RSpec.configure do |config|
# show exception that triggers a retry if verbose_retry is set to true
config.display_try_failure_messages = true
config.around do |example|
retry_times = example.metadata.keys.include?(:quarantine) ? 1 : 2
example.run_with_retry retry: retry_times
if ENV['CI']
config.around do |example|
retry_times = example.metadata.keys.include?(:quarantine) ? 1 : 2
example.run_with_retry retry: retry_times
end
end
end