Skip to content

Commit

Permalink
Check missing deps
Browse files Browse the repository at this point in the history
  • Loading branch information
TonyCTHsu committed Nov 11, 2024
1 parent 88e10ee commit 6c721f2
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,13 @@ namespace :test do
end

candidates.each do |appraisal_group, _|
command = if appraisal_group.empty?
"bundle exec rake #{spec_task}"
else
gemfile = File.join(File.dirname(__FILE__), 'gemfiles', "#{ruby_runtime}-#{appraisal_group}.gemfile".tr('-', '_'))
"env BUNDLE_GEMFILE=#{gemfile} bundle exec rake #{spec_task}"
end

env = if appraisal_group.empty?
{}
else
gemfile = File.join(File.dirname(__FILE__), 'gemfiles', "#{ruby_runtime}-#{appraisal_group}.gemfile".tr('-', '_'))
{ 'BUNDLE_GEMFILE' => gemfile }
end
command = "bundle check || bundle install && bundle exec rake #{spec_task}"
command += "'[#{spec_arguments}]'" if spec_arguments

total_executors = ENV.key?('CIRCLE_NODE_TOTAL') ? ENV['CIRCLE_NODE_TOTAL'].to_i : nil
Expand All @@ -71,9 +71,9 @@ namespace :test do
if total_executors && current_executor && total_executors > 1
@execution_count ||= 0
@execution_count += 1
sh(command) if @execution_count % total_executors == current_executor
Bundler.with_unbundled_env { sh(env, command) } if @execution_count % total_executors == current_executor
else
sh(command)
Bundler.with_unbundled_env { sh(env, command) }
end
end
end
Expand Down

0 comments on commit 6c721f2

Please sign in to comment.