When on CI, enable RSpec profiling for `master` only

We don't actually need to monitor RSpec for all our branches.

Signed-off-by: Rémy Coutable <remy@rymai.me>
This commit is contained in:
Rémy Coutable 2017-03-24 19:58:03 +01:00
parent f23b35b012
commit e0e208abae
No known key found for this signature in database
GPG Key ID: 46DF07E5CD9E96AB
1 changed files with 2 additions and 1 deletions

View File

@ -9,7 +9,8 @@ require 'rspec/rails'
require 'shoulda/matchers'
require 'rspec/retry'
if ENV['RSPEC_PROFILING_POSTGRES_URL'] || ENV['RSPEC_PROFILING']
if (ENV['RSPEC_PROFILING_POSTGRES_URL'] || ENV['RSPEC_PROFILING']) &&
(!ENV.has_key?('CI') || ENV['CI_COMMIT_REF_NAME'] == 'master')
require 'rspec_profiling/rspec'
end