From 2c9d8e547fd4fc5963e07239b2433b1f15c819db Mon Sep 17 00:00:00 2001 From: "Ben Sheldon [he/him]" Date: Thu, 30 Dec 2021 09:10:47 -0800 Subject: [PATCH] Doublequote Ruby 3.0 and add Ruby 3.1 to testing matrix --- .github/workflows/test.yml | 10 +++++----- Appraisals | 21 +++++++++++++-------- 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 863b94e52..5ad018563 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -34,16 +34,16 @@ jobs: timeout-minutes: 15 strategy: matrix: - ruby: [2.5, 2.6, 2.7, 3.0, jruby-9.2, jruby-9.3] + ruby: [2.5, 2.6, 2.7, "3.0", 3.1, jruby-9.2, jruby-9.3] pg: [14] include: - - ruby: 3.0 + - ruby: "3.0" pg: 10 - - ruby: 3.0 + - ruby: "3.0" pg: 11 - - ruby: 3.0 + - ruby: "3.0" pg: 12 - - ruby: 3.0 + - ruby: "3.0" pg: 13 - ruby: jruby-9.3 pg: 10 diff --git a/Appraisals b/Appraisals index 70c75ea10..94ee21df3 100644 --- a/Appraisals +++ b/Appraisals @@ -1,6 +1,7 @@ # frozen_string_literal: true ruby_2 = Gem::Version.new(RUBY_VERSION) < Gem::Version.new('3') ruby_27_or_higher = Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('2.7') +ruby_31 = Gem::Version.new(RUBY_VERSION) == Gem::Version.new('3.1') jruby = RUBY_PLATFORM.include?('java') if ruby_2 @@ -18,16 +19,20 @@ appraise "rails-6.1" do end if ruby_27_or_higher && !jruby - # Rails HEAD requires MRI 2.7+ + # Rails 7+ requires MRI 2.7+ # activerecord-jdbcpostgresql-adapter does not have a compatible version - appraise "rails-7.0" do - gem "rails", "~> 7.0.0" - gem "selenium-webdriver", "~> 4.0" # https://github.com/rails/rails/pull/43498 + + # Rails 7.0.0 is incompatible with Ruby 3.1 + # https://gist.github.com/yahonda/2776d8d7b6ea7045359f38c10449937b + unless ruby_31 + appraise "rails-7.0" do + gem "rails", "~> 7.0.0" + gem "selenium-webdriver", "~> 4.0" # https://github.com/rails/rails/pull/43498 + end end - # https://github.com/rails/rails/issues/43422 - # appraise "rails-head" do - # gem "rails", github: "rails/rails", branch: "main" - # end + appraise "rails-head" do + gem "rails", github: "rails/rails", branch: "main" + end end