Skip to content
Snippets Groups Projects
Commit fd383970 authored by Nick Thomas's avatar Nick Thomas
Browse files

rspec_profiling: Discover the correct branch name in GitLab CI

parent b88e82ff
No related branches found
No related tags found
No related merge requests found
Loading
@@ -4,6 +4,12 @@ module RspecProfilingConnection
Loading
@@ -4,6 +4,12 @@ module RspecProfilingConnection
end end
end end
   
module RspecProfilingGitBranchCi
def branch
ENV['CI_BUILD_REF_NAME'] || super
end
end
if Rails.env.test? if Rails.env.test?
RspecProfiling.configure do |config| RspecProfiling.configure do |config|
if ENV['RSPEC_PROFILING_POSTGRES_URL'] if ENV['RSPEC_PROFILING_POSTGRES_URL']
Loading
@@ -11,4 +17,6 @@ if Rails.env.test?
Loading
@@ -11,4 +17,6 @@ if Rails.env.test?
config.collector = RspecProfiling::Collectors::PSQL config.collector = RspecProfiling::Collectors::PSQL
end end
end end
RspecProfiling::VCS::Git.prepend(RspecProfilingGitBranchCi) if ENV.has_key?('CI')
end end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment