From dce53bb68d3261d9731f78ba488726789502c136 Mon Sep 17 00:00:00 2001 From: Geremia Taglialatela Date: Sun, 28 May 2023 09:38:05 +0200 Subject: [PATCH 1/3] Improve CI GitHub Action - Update checkout action to v3. Node.js 12 actions are deprecated - Test against Ruby 3.2 - Test against Ruby and Rails head to detect breaking changes and deprecation in advantage. Mark runs as experimental, so they are allowed to fail --- .github/workflows/ci.yml | 33 ++++++++++++++++++++++++++------- 1 file changed, 26 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2501d97..6208b8c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,24 +6,43 @@ jobs: strategy: fail-fast: false matrix: + ruby: ['2.7', '3.0', '3.1', '3.2'] + gemfile: [ rails_7_0 ] + channel: ['stable'] + include: - gemfile: rails_7_0 - ruby: 2.7 - - gemfile: rails_7_0 - ruby: 3.0 - - gemfile: rails_7_0 - ruby: 3.1 + ruby: head + channel: 'experimental' + - gemfile: rails_edge + ruby: '2.7' + channel: 'experimental' + - gemfile: rails_edge + ruby: '3.0' + channel: 'experimental' + - gemfile: rails_edge + ruby: '3.1' + channel: 'experimental' + - gemfile: rails_edge + ruby: '3.2' + channel: 'experimental' + - gemfile: rails_edge + ruby: head + channel: 'experimental' + + continue-on-error: ${{ matrix.channel != 'stable' }} - name: ${{ matrix.gemfile }}, ruby ${{ matrix.ruby }} + name: ${{ matrix.gemfile }}, ruby ${{ matrix.ruby }} (${{ matrix.channel }}) env: BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Set up Ruby uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby }} + rubygems: latest bundler-cache: true - name: Run specs From f7648e121d25f96f4c6e636029f4eddcc1d5cc3c Mon Sep 17 00:00:00 2001 From: Geremia Taglialatela Date: Thu, 5 Oct 2023 19:25:43 +0200 Subject: [PATCH 2/3] Update checkout actions and keep actions updated Use Dependabot to keep GitHub Actions updated --- .github/dependabot.yml | 4 ++++ .github/workflows/ci.yml | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 9071cbc..83455f9 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,5 +1,9 @@ version: 2 updates: + - package-ecosystem: github-actions + directory: / + schedule: + interval: weekly - package-ecosystem: bundler directory: "/" schedule: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6208b8c..e28685a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,7 +36,7 @@ jobs: env: BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Ruby uses: ruby/setup-ruby@v1 From 87146242e7e58de21507ca1add7e3fa3aba88a98 Mon Sep 17 00:00:00 2001 From: Geremia Taglialatela Date: Thu, 4 Jan 2024 09:56:20 +0100 Subject: [PATCH 3/3] Test Against Rails 7.1 Also: - Set 7.1 as the default Rails in Gemfile - Do not test Rails edge against Ruby < 3.1 (rails/rails#50491) --- .github/workflows/ci.yml | 14 +++++++------- Appraisals | 4 ++++ Gemfile | 2 +- gemfiles/rails_7_0.gemfile | 2 +- gemfiles/rails_7_1.gemfile | 13 +++++++++++++ gemfiles/rails_edge.gemfile | 4 ++-- 6 files changed, 28 insertions(+), 11 deletions(-) create mode 100644 gemfiles/rails_7_1.gemfile diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e28685a..2b28bad 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,19 +6,16 @@ jobs: strategy: fail-fast: false matrix: - ruby: ['2.7', '3.0', '3.1', '3.2'] - gemfile: [ rails_7_0 ] + ruby: ['2.7', '3.0', '3.1', '3.2', '3.3'] + gemfile: [rails_7_0, rails_7_1] channel: ['stable'] include: - gemfile: rails_7_0 ruby: head channel: 'experimental' - - gemfile: rails_edge - ruby: '2.7' - channel: 'experimental' - - gemfile: rails_edge - ruby: '3.0' + - gemfile: rails_7_1 + ruby: head channel: 'experimental' - gemfile: rails_edge ruby: '3.1' @@ -26,6 +23,9 @@ jobs: - gemfile: rails_edge ruby: '3.2' channel: 'experimental' + - gemfile: rails_edge + ruby: '3.3' + channel: 'experimental' - gemfile: rails_edge ruby: head channel: 'experimental' diff --git a/Appraisals b/Appraisals index eefc9b9..9e3e256 100644 --- a/Appraisals +++ b/Appraisals @@ -2,6 +2,10 @@ appraise "rails_7_0" do gem "rails", "~> 7.0.0" end +appraise "rails_7_1" do + gem "rails", "~> 7.1.0" +end + appraise "rails_edge" do gem "rails", git: "https://github.com/rails/rails.git", branch: "main" end diff --git a/Gemfile b/Gemfile index eea059c..92f5aaa 100644 --- a/Gemfile +++ b/Gemfile @@ -2,7 +2,7 @@ source 'https://rubygems.org' gemspec -gem 'rails', '~> 7.0.0' +gem 'rails', '~> 7.1.0' gem 'rspec' gem 'rspec-rails', '~> 6.0' gem 'sqlite3' diff --git a/gemfiles/rails_7_0.gemfile b/gemfiles/rails_7_0.gemfile index 1ab09ef..6b12c6a 100644 --- a/gemfiles/rails_7_0.gemfile +++ b/gemfiles/rails_7_0.gemfile @@ -1,6 +1,6 @@ # This file was generated by Appraisal -source "http://rubygems.org" +source "https://rubygems.org" gem "rails", "~> 7.0.0" gem "rspec" diff --git a/gemfiles/rails_7_1.gemfile b/gemfiles/rails_7_1.gemfile new file mode 100644 index 0000000..5da8edc --- /dev/null +++ b/gemfiles/rails_7_1.gemfile @@ -0,0 +1,13 @@ +# This file was generated by Appraisal + +source "https://rubygems.org" + +gem "rails", "~> 7.1.0" +gem "rspec" +gem "rspec-rails", "~> 6.0" +gem "sqlite3" +gem "byebug" +gem "appraisal" +gem "nokogiri", "~> 1.8" + +gemspec path: "../" diff --git a/gemfiles/rails_edge.gemfile b/gemfiles/rails_edge.gemfile index c0f17d4..2694eea 100644 --- a/gemfiles/rails_edge.gemfile +++ b/gemfiles/rails_edge.gemfile @@ -1,10 +1,10 @@ # This file was generated by Appraisal -source "http://rubygems.org" +source "https://rubygems.org" gem "rails", git: "https://github.com/rails/rails.git", branch: "main" gem "rspec" -gem "rspec-rails", "~> 3.7" +gem "rspec-rails", "~> 6.0" gem "sqlite3" gem "byebug" gem "appraisal"