Skip to content

Commit a98d945

Browse files
committed
Fix
1 parent e74ba69 commit a98d945

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,8 @@ jobs:
3535
ruby-version: ${{ matrix.ruby }}
3636
bundler-cache: true
3737

38-
- name: Debug - run fib benchmark directly
39-
run: bundle exec ruby -I harness benchmarks/fib.rb
40-
41-
- name: Run CLI integration tests in isolation
42-
run: bundle exec ruby -Ilib:test test/benchmark_runner_cli_test.rb --verbose --name "/parses ARGV/"
43-
4438
- name: Run tests
45-
run: bundle exec rake test --trace
39+
run: bundle exec rake test
4640

4741
benchmark-default:
4842
runs-on: ubuntu-latest

lib/benchmark_suite.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,15 @@ def benchmark_env(ruby)
180180
end
181181
end
182182

183+
# Clear Bundler environment variables to prevent the parent's bundle context
184+
# from leaking into benchmark subprocesses. Benchmarks that need Bundler will
185+
# set up their own context via use_gemfile in the harness.
186+
# This is especially important when running tests under `bundle exec rake test`.
187+
["BUNDLE_GEMFILE", "BUNDLE_BIN_PATH", "BUNDLE_PATH", "BUNDLER_VERSION",
188+
"BUNDLER_SETUP", "RUBYOPT", "RUBYLIB"].each do |var|
189+
env[var] = nil if ENV.key?(var)
190+
end
191+
183192
env
184193
end
185194

0 commit comments

Comments
 (0)