From 7d95a97ab0dca454cc3f966311bba6c315780bf7 Mon Sep 17 00:00:00 2001 From: Hartley McGuire Date: Tue, 28 Feb 2023 20:25:58 -0500 Subject: [PATCH] Add test:arel to test separately from adapters Previously, all of the Arel tests would be run with every database adapter. This is not necessarily a problem, but these tests end up running redundantly for each adapter/database combination even though they do not interact with adapters at all. This commit follows up a [commit][1] in Rails that added a new test:arel task for Active Record. This additional step creates a place for Arel to be tested a single time, so that a followup PR to Rails can filter out Arel tests when testing adapters. Since the task is only present on the main branch, it cannot run for all Rails versions and must be a special case. [1] rails/rails@f362f0796f2dd750fc03892ed45a57d145426bff --- pipeline-generate | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pipeline-generate b/pipeline-generate index 590e731f..6f31ca4f 100755 --- a/pipeline-generate +++ b/pipeline-generate @@ -296,6 +296,10 @@ if REPO_ROOT.join("actionview/Rakefile").read.include?("task :ujs") x["retry"] = { "automatic" => { "limit" => 3 } } end end +if REPO_ROOT.join("activerecord/Rakefile").read.match?("[Tt]ask.*:arel") + # Added during 7.1 development on main + steps_for("activerecord", "test:arel", service: "default") +end steps_for("activejob", "test:integration", service: "activejob") do |x| # Enable soft_fail until the problem in queue_classic is solved. # https://github.com/rails/rails/pull/37517#issuecomment-545370408