Commit 1761da51 authored by Rémy Coutable's avatar Rémy Coutable

Retry only on feature specs that use JS, on CI

Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent 5f7592d5
......@@ -7,8 +7,6 @@ cache:
variables:
MYSQL_ALLOW_EMPTY_PASSWORD: "1"
# retry tests only in CI environment
RSPEC_RETRY_RETRY_COUNT: "3"
RAILS_ENV: "test"
SIMPLECOV: "true"
SETUP_DB: "true"
......
......@@ -57,6 +57,13 @@ RSpec.configure do |config|
TestEnv.init
end
if ENV['CI']
# Retry only on feature specs that use JS
config.around :each, :js do |ex|
ex.run_with_retry retry: 3
end
end
config.around(:each, :caching) do |example|
caching_store = Rails.cache
Rails.cache = ActiveSupport::Cache::MemoryStore.new if example.metadata[:caching]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment