summaryrefslogtreecommitdiff
path: root/spec/spec_helper.rb
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2017-03-24 19:58:03 +0100
committerRémy Coutable <remy@rymai.me>2017-03-24 19:58:03 +0100
commite0e208abae3aacb4a8ad7fa8fdf8d8dd4ea14c4c (patch)
tree82bce18a0aa7c961dfd65aa19d483ae4acca27ce /spec/spec_helper.rb
parentf23b35b01297d1d14cfdf17594c4abf28ab45dc9 (diff)
downloadgitlab-ce-e0e208abae3aacb4a8ad7fa8fdf8d8dd4ea14c4c.tar.gz
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>
Diffstat (limited to 'spec/spec_helper.rb')
-rw-r--r--spec/spec_helper.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index 5ab8f0d981a..4eb5b150af5 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -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