diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5b6e6b7b..a4465177 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,7 +5,7 @@ on: [push, pull_request] jobs: build: runs-on: ubuntu-latest - name: Ruby ${{ matrix.ruby }} | Rails ${{ matrix.rails }} | Gemfile ${{ matrix.gemfile }} + name: Ruby ${{ matrix.ruby }} | Rails ${{ matrix.rails }} continue-on-error: ${{ matrix.rails == 'edge' }} services: redis: @@ -17,7 +17,6 @@ jobs: ruby: ["2.6", "2.7", "3.0", "3.1", "3.2", "3.3"] rails: ["~> 5.2.0", "~> 6.0.0", "~> 6.1.0", "~> 7.0.0", "~> 7.1.0", "edge"] - gemfile: [rails_gems] exclude: - ruby: "2.6" rails: "~> 7.0.0" @@ -55,9 +54,7 @@ jobs: include: - ruby: head rails: "edge" - gemfile: rails_gems env: - BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile RAILS_GEMS_REQUIREMENTS: ${{ matrix.rails }} steps: - name: Check out code diff --git a/Gemfile b/Gemfile index 94f9e46c..e5b1274a 100644 --- a/Gemfile +++ b/Gemfile @@ -11,12 +11,14 @@ gemspec gem "sidekiq" gem "resque" -if defined?(@rails_gems_requirements) && @rails_gems_requirements +if (rails_gems_requirements = ENV["RAILS_GEMS_REQUIREMENTS"]) + rails_gems_requirements = { github: "rails/rails", branch: "main" } if rails_gems_requirements == "edge" + # We avoid the `gem "..."` syntax here so Dependabot doesn't try to update these gems. [ "activejob", "activerecord", - ].each { |name| gem name, @rails_gems_requirements } + ].each { |name| gem name, rails_gem_requirements } else # gem "activejob" # Set in gemspec gem "activerecord" diff --git a/gemfiles/rails_gems.gemfile b/gemfiles/rails_gems.gemfile deleted file mode 100644 index 66c709bb..00000000 --- a/gemfiles/rails_gems.gemfile +++ /dev/null @@ -1,6 +0,0 @@ -# frozen_string_literal: true - -@rails_gems_requirements = ENV.fetch("RAILS_GEMS_REQUIREMENTS") -@rails_gems_requirements = { github: "rails/rails", branch: "main" } if @rails_gems_requirements == "edge" - -eval_gemfile "../Gemfile"