rspec_junit_formatter icon indicating copy to clipboard operation
rspec_junit_formatter copied to clipboard

Improvement: replace ENV['TEST_ENV_NUMBER']

Open wscourge opened this issue 2 years ago • 0 comments

Hey, here's a nice thing I found in other open-sourced gem knapsack

def ci_node_index
  gitlab_ci_node_index || ENV['CI_NODE_INDEX'] || ENV['CIRCLE_NODE_INDEX'] || semaphore_job_index || semaphore_current_thread || ENV['BUILDKITE_PARALLEL_JOB'] || snap_ci_worker_index || ENV['BITBUCKET_PARALLEL_STEP'] || 0
end

Assuming that no1 actually reads XML junit and its usage is for CI to render nice results in the UI, I suggest replacing your custom TEST_ENV_NUMBER variable with this approach.

Cheers, and keep up the good work!

wscourge avatar Jan 05 '23 11:01 wscourge