diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 3d37c18..94c1a19 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -9,18 +9,38 @@ jobs: ci: runs-on: ubuntu-latest strategy: + fail-fast: false matrix: ruby-version: - - '2.5' - - '2.6' - '2.7' - '3.0' - '3.1' - '3.2' - '3.3' - - '3.2' - - '3.3' + rails-version: + - '6.0' + - '6.1' + - '7.0' + - '7.1' + include: + # Rails 7.0 and 7.1 support Ruby >= 2.7.0 + - ruby-version: '2.5' + rails-version: '6.0' + - ruby-version: '2.5' + rails-version: '6.1' + - ruby-version: '2.6' + rails-version: '6.0' + - ruby-version: '2.6' + rails-version: '6.1' + # Rails 7.2 supports Ruby >= 3.1.0 + - ruby-version: '3.1' + rails-version: '7.2' + - ruby-version: '3.2' + rails-version: '7.2' + - ruby-version: '3.3' + rails-version: '7.2' env: + TEST_RAILS_VERSION: "${{ matrix.rails-version }}" CC_TEST_REPORTER_ID: "${{ secrets.CC_TEST_REPORTER_ID }}" steps: - uses: actions/checkout@v4 diff --git a/Gemfile b/Gemfile index a9a25fe..2903d4f 100644 --- a/Gemfile +++ b/Gemfile @@ -6,11 +6,16 @@ require File.join(Bundler::Plugin.index.load_paths("bundler-inject")[0], "bundle # Specify your gem's dependencies in more_core_extensions.gemspec gemspec -# Rails 5 dropped support for Ruby < 2.2.2 -# Rails 6 dropped support for Ruby < 2.4.4 -if Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.2.2") - active_support_version = "< 5" -elsif Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.4.4") - active_support_version = "< 6" -end -gem 'activesupport', active_support_version +minimum_version = + case ENV['TEST_RAILS_VERSION'] + when "7.2", nil + "~>7.2.1" + when "7.1" + "~>7.1.4" + when "7.0" + "~>7.0.8" + else "6.1" + "~>6.1.7" + end + +gem "activesupport", minimum_version diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 70ee2f8..e3e867b 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -3,3 +3,6 @@ $LOAD_PATH.unshift File.expand_path("../../lib", __FILE__) require "more_core_extensions/all" + +puts +puts "\e[93mUsing ActiveSupport #{ActiveSupport.version}\e[0m"