diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ec46b389..5b6e6b7b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,8 +5,8 @@ on: [push, pull_request] jobs: build: runs-on: ubuntu-latest - name: Ruby ${{ matrix.ruby }} | Gemfile ${{ matrix.gemfile }} - continue-on-error: ${{ matrix.gemfile == 'rails_edge' }} + name: Ruby ${{ matrix.ruby }} | Rails ${{ matrix.rails }} | Gemfile ${{ matrix.gemfile }} + continue-on-error: ${{ matrix.rails == 'edge' }} services: redis: image: redis @@ -15,46 +15,50 @@ jobs: strategy: matrix: ruby: ["2.6", "2.7", "3.0", "3.1", "3.2", "3.3"] - gemfile: [rails_5_2, rails_6_0, rails_6_1, rails_7_0, rails_7_1, rails_edge] + rails: + ["~> 5.2.0", "~> 6.0.0", "~> 6.1.0", "~> 7.0.0", "~> 7.1.0", "edge"] + gemfile: [rails_gems] exclude: - ruby: "2.6" - gemfile: rails_7_0 + rails: "~> 7.0.0" - ruby: "2.6" - gemfile: rails_7_1 + rails: "~> 7.1.0" - ruby: "2.6" - gemfile: rails_edge + rails: "edge" - ruby: "2.7" - gemfile: rails_7_1 + rails: "~> 7.1.0" - ruby: "2.7" - gemfile: rails_edge + rails: "edge" - ruby: "3.0" - gemfile: rails_5_2 + rails: "~> 5.2.0" - ruby: "3.0" - gemfile: rails_7_1 + rails: "~> 7.1.0" - ruby: "3.0" - gemfile: rails_edge + rails: "edge" - ruby: "3.1" - gemfile: rails_5_2 + rails: "~> 5.2.0" - ruby: "3.1" - gemfile: rails_6_0 + rails: "~> 6.0.0" - ruby: "3.2" - gemfile: rails_5_2 + rails: "~> 5.2.0" - ruby: "3.2" - gemfile: rails_6_0 + rails: "~> 6.0.0" - ruby: "3.2" - gemfile: rails_6_1 + rails: "~> 6.1.0" - ruby: "3.3" - gemfile: rails_5_2 + rails: "~> 5.2.0" - ruby: "3.3" - gemfile: rails_6_0 + rails: "~> 6.0.0" - ruby: "3.3" - gemfile: rails_6_1 + rails: "~> 6.1.0" include: - ruby: head - gemfile: rails_edge + rails: "edge" + gemfile: rails_gems env: BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile + RAILS_GEMS_REQUIREMENTS: ${{ matrix.rails }} steps: - name: Check out code uses: actions/checkout@v4 diff --git a/gemfiles/rails_5_2.gemfile b/gemfiles/rails_5_2.gemfile deleted file mode 100644 index 20aa12b5..00000000 --- a/gemfiles/rails_5_2.gemfile +++ /dev/null @@ -1,5 +0,0 @@ -# frozen_string_literal: true - -@rails_gems_requirements = "~> 5.2.0" - -eval_gemfile "../Gemfile" diff --git a/gemfiles/rails_6_0.gemfile b/gemfiles/rails_6_0.gemfile deleted file mode 100644 index f6f0ee3a..00000000 --- a/gemfiles/rails_6_0.gemfile +++ /dev/null @@ -1,5 +0,0 @@ -# frozen_string_literal: true - -@rails_gems_requirements = "~> 6.0.0" - -eval_gemfile "../Gemfile" diff --git a/gemfiles/rails_6_1.gemfile b/gemfiles/rails_6_1.gemfile deleted file mode 100644 index 1e299552..00000000 --- a/gemfiles/rails_6_1.gemfile +++ /dev/null @@ -1,11 +0,0 @@ -# frozen_string_literal: true - -@rails_gems_requirements = "~> 6.1.0" - -eval_gemfile "../Gemfile" - -if Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new("3.1") - gem "net-imap", require: false - gem "net-pop", require: false - gem "net-smtp", require: false -end diff --git a/gemfiles/rails_7_0.gemfile b/gemfiles/rails_7_0.gemfile deleted file mode 100644 index 89808c81..00000000 --- a/gemfiles/rails_7_0.gemfile +++ /dev/null @@ -1,5 +0,0 @@ -# frozen_string_literal: true - -@rails_gems_requirements = "~> 7.0.0" - -eval_gemfile "../Gemfile" diff --git a/gemfiles/rails_7_1.gemfile b/gemfiles/rails_7_1.gemfile deleted file mode 100644 index 7eded52f..00000000 --- a/gemfiles/rails_7_1.gemfile +++ /dev/null @@ -1,5 +0,0 @@ -# frozen_string_literal: true - -@rails_gems_requirements = "~> 7.1.0" - -eval_gemfile "../Gemfile" diff --git a/gemfiles/rails_edge.gemfile b/gemfiles/rails_gems.gemfile similarity index 53% rename from gemfiles/rails_edge.gemfile rename to gemfiles/rails_gems.gemfile index eabf1c86..66c709bb 100644 --- a/gemfiles/rails_edge.gemfile +++ b/gemfiles/rails_gems.gemfile @@ -1,5 +1,6 @@ # frozen_string_literal: true -@rails_gems_requirements = { github: "rails/rails", branch: "main" } +@rails_gems_requirements = ENV.fetch("RAILS_GEMS_REQUIREMENTS") +@rails_gems_requirements = { github: "rails/rails", branch: "main" } if @rails_gems_requirements == "edge" eval_gemfile "../Gemfile"