Skip to content

Commit 1f0262a

Browse files
committed
Separate the CI environment from the application CI environment
Right now we are using both to test the Rails applications we generate and to test Rails itself. Let's keep CI for the app and BUILDKITE to the framework.
1 parent aa4e713 commit 1f0262a

File tree

17 files changed

+24
-17
lines changed

17 files changed

+24
-17
lines changed

actionmailbox/test/test_helper.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
ENV["RAILS_ENV"] = "test"
66
ENV["RAILS_INBOUND_EMAIL_PASSWORD"] = "tbsy84uSV1Kt3ZJZELY2TmShPRs91E3yL4tzf96297vBCkDWgL"
77

8+
require_relative "../../tools/test_common"
9+
810
require_relative "../test/dummy/config/environment"
911
ActiveRecord::Migrator.migrations_paths = [File.expand_path("../test/dummy/db/migrate", __dir__)]
1012
require "rails/test_help"
@@ -53,5 +55,3 @@ def bounce(to:)
5355
end
5456
end
5557
end
56-
57-
require_relative "../../tools/test_common"

activejob/test/helper.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# frozen_string_literal: true
22

3+
require_relative "../../tools/test_common"
4+
35
require "active_support/testing/strict_warnings"
46
require "active_job"
57
require "support/job_buffer"
@@ -18,8 +20,6 @@
1820

1921
require "active_support/testing/autorun"
2022

21-
require_relative "../../tools/test_common"
22-
2323
def adapter_is?(*adapter_class_symbols)
2424
adapter_class_symbols.map(&:to_s).include? ActiveJob::Base.queue_adapter_name
2525
end

activejob/test/support/integration/adapters/backburner.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ def setup
99
end
1010
unless can_run?
1111
puts "Cannot run integration tests for backburner. To be able to run integration tests for backburner you need to install and start beanstalkd.\n"
12-
status = ENV["CI"] ? false : true
12+
status = ENV["BUILDKITE"] ? false : true
1313
exit status
1414
end
1515
end

activejob/test/support/integration/adapters/queue_classic.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def start_workers
4141

4242
rescue PG::ConnectionBad
4343
puts "Cannot run integration tests for queue_classic. To be able to run integration tests for queue_classic you need to install and start postgresql.\n"
44-
status = ENV["CI"] ? false : true
44+
status = ENV["BUILDKITE"] ? false : true
4545
exit status
4646
end
4747

activejob/test/support/integration/adapters/resque.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ def setup
77
Resque.logger = Rails.logger
88
unless can_run?
99
puts "Cannot run integration tests for resque. To be able to run integration tests for resque you need to install and start redis.\n"
10-
status = ENV["CI"] ? false : true
10+
status = ENV["BUILDKITE"] ? false : true
1111
exit status
1212
end
1313
end

activejob/test/support/integration/adapters/sidekiq.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def setup
1010
ActiveJob::Base.queue_adapter = :sidekiq
1111
unless can_run?
1212
puts "Cannot run integration tests for sidekiq. To be able to run integration tests for sidekiq you need to install and start redis.\n"
13-
status = ENV["CI"] ? false : true
13+
status = ENV["BUILDKITE"] ? false : true
1414
exit status
1515
end
1616
end

activejob/test/support/integration/adapters/sneakers.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def setup
1818
log: Rails.root.join("log/sneakers.log").to_s
1919
unless can_run?
2020
puts "Cannot run integration tests for sneakers. To be able to run integration tests for sneakers you need to install and start rabbitmq.\n"
21-
status = ENV["CI"] ? false : true
21+
status = ENV["BUILDKITE"] ? false : true
2222
exit status
2323
end
2424
end

activerecord/test/support/connection.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def self.connect
2222
ActiveRecord.async_query_executor = :global_thread_pool
2323
puts "Using #{connection_name}"
2424

25-
if ENV["CI"]
25+
if ENV["BUILDKITE"]
2626
ActiveRecord::Base.logger = nil
2727
else
2828
ActiveRecord::Base.logger = ActiveSupport::Logger.new("debug.log", 1, 100.megabytes)

activestorage/test/analyzer/image_analyzer/image_magick_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def analyze_with_image_magick
6565

6666
yield
6767
rescue LoadError
68-
ENV["CI"] ? raise : skip("Variant processor image_magick is not installed")
68+
ENV["BUILDKITE"] ? raise : skip("Variant processor image_magick is not installed")
6969
ensure
7070
ActiveStorage.variant_processor = previous_processor
7171
end

activestorage/test/analyzer/image_analyzer/vips_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def analyze_with_vips
6565

6666
yield
6767
rescue LoadError
68-
ENV["CI"] ? raise : skip("Variant processor vips is not installed")
68+
ENV["BUILDKITE"] ? raise : skip("Variant processor vips is not installed")
6969
ensure
7070
ActiveStorage.variant_processor = previous_processor
7171
end

0 commit comments

Comments
 (0)