Commit 01c2a50f authored by Rémy Coutable's avatar Rémy Coutable

Merge branch 'rspec-profiling-branch-name-in-ci' into 'master'

rspec_profiling: Discover the correct branch name in GitLab CI

See merge request !9134
parents 6cbfe139 fd383970
......@@ -4,6 +4,12 @@ module RspecProfilingConnection
end
end
module RspecProfilingGitBranchCi
def branch
ENV['CI_BUILD_REF_NAME'] || super
end
end
if Rails.env.test?
RspecProfiling.configure do |config|
if ENV['RSPEC_PROFILING_POSTGRES_URL']
......@@ -11,4 +17,6 @@ if Rails.env.test?
config.collector = RspecProfiling::Collectors::PSQL
end
end
RspecProfiling::VCS::Git.prepend(RspecProfilingGitBranchCi) if ENV.has_key?('CI')
end
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