Skip to content

Commit

Permalink
Only run extra Rack jobs on Rails 7.1+
Browse files Browse the repository at this point in the history
Rails <= 7.0 does not support Rack 3, so any `rack-3-0` and `rack-head`
jobs will necessarily fail. Additionally, `rack-2` is not needed because
the default jobs are already testing Rack 2.
  • Loading branch information
skipkayhil authored and rafaelfranca committed Jun 26, 2024
1 parent 2a1d85c commit fd6f5ad
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pipelines/rails-ci/pipeline.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,12 @@
rake "actionmailer"
rake "actionpack"

if ruby == build_context.default_ruby
if ruby == build_context.default_ruby && build_context.rails_version >= Gem::Version.new("7.1.x")
rake "actionpack",
pre_steps: ["bundle install"],
label: "[rack-2]",
env: { RACK: "~> 2.0" }

rake "actionpack",
pre_steps: ["bundle install"],
label: "[rack-3-0]",
Expand Down Expand Up @@ -133,7 +134,7 @@

rake "railties", service: "railties", parallelism: 12

if ruby == build_context.default_ruby
if ruby == build_context.default_ruby && build_context.rails_version >= Gem::Version.new("7.1.x")
rake "railties",
service: "railties",
pre_steps: ["bundle install"],
Expand Down

0 comments on commit fd6f5ad

Please sign in to comment.