Skip to content

Commit

Permalink
Add Ruby 3.2 to the CI matrix. Also update cache and checkout actions…
Browse files Browse the repository at this point in the history
… versions. (#1536)

To get this working I needed to:

1. Revisit gem restrictions for the Rails 7 gemfile, allowing more recent rake versions and setting the rspec-rails version to 6.x, which is appropriate for Rails 7
2. Exclude byebug if this is Ruby 3.2 or higher

I also updated the bundler version in the Rails 7 gemfile and fixed a deprecated configuration parameter in the Rubocop configuration to eliminate warnings.
  • Loading branch information
petergoldstein authored Jan 10, 2023
1 parent d33df49 commit 8fc832d
Show file tree
Hide file tree
Showing 7 changed files with 115 additions and 102 deletions.
22 changes: 13 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,10 @@ jobs:
fail-fast: false
matrix:
ruby:
- 3.1.2
- 3.0.4
- 2.7.6
- 3.2.0
- 3.1.3
- 3.0.5
- 2.7.7
- 2.6.10
appraisal:
- rails_7_0
Expand All @@ -40,22 +41,25 @@ jobs:
- sqlite3
- postgresql
exclude:
- { ruby: 3.1.2, appraisal: rails_5_2 }
- { ruby: 3.0.4, appraisal: rails_5_2 }
- { ruby: 3.0.4, appraisal: rails_7_0 }
- { ruby: 2.7.6, appraisal: rails_7_0 }
- { ruby: 3.2.0, appraisal: rails_5_2 }
- { ruby: 3.2.0, appraisal: rails_6_0 }
- { ruby: 3.2.0, appraisal: rails_6_1 }
- { ruby: 3.1.3, appraisal: rails_5_2 }
- { ruby: 3.0.5, appraisal: rails_5_2 }
- { ruby: 3.0.5, appraisal: rails_7_0 }
- { ruby: 2.7.7, appraisal: rails_7_0 }
- { ruby: 2.6.10, appraisal: rails_7_0 }
env:
DATABASE_ADAPTER: ${{ matrix.adapter }}
BUNDLE_GEMFILE: gemfiles/${{ matrix.appraisal }}.gemfile
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Ruby
id: set-up-ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
- uses: actions/cache@v2
- uses: actions/cache@v3
with:
path: vendor/bundle
key: v1-rubygems-local-${{ runner.os }}-${{ matrix.ruby }}-${{ hashFiles(format('gemfiles/{0}.gemfile.lock', matrix.appraisal)) }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ jobs:

steps:
- name: Checkout Repository
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Setup Ruby
uses: ruby/setup-ruby@v1

- name: Cache gems
uses: actions/cache@v1
uses: actions/cache@v3
with:
path: ../vendor/bundle
key: ${{ runner.os }}-rubocop-${{ hashFiles('**/Gemfile.lock') }}
Expand Down
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Layout/HeredocIndentation:
Layout/LineLength:
Exclude:
- spec/**/*
IgnoredPatterns:
AllowedPatterns:
- !ruby/regexp /\A +(it|describe|context|shared_examples|include_examples|it_behaves_like) ["']/
- !ruby/regexp /\A(require|require_relative) ["']/
- '^[ ]*#.+$'
Expand Down
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -99,4 +99,4 @@ DEPENDENCIES
zeus

BUNDLED WITH
2.2.32
2.4.3
4 changes: 2 additions & 2 deletions gemfiles/rails_7_0.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ gem "appraisal", "2.2.0"
gem "bundler", "~> 2.0"
gem "pry"
gem "pry-byebug"
gem "rake", "13.0.1"
gem "rake", "~> 13.0"
gem "rspec", "~> 3.9"
gem "rubocop", require: false
gem "rubocop-packaging", require: false
Expand All @@ -19,7 +19,7 @@ gem "rouge"
gem "yard"
gem "spring"
gem "spring-commands-rspec"
gem "rspec-rails", "~> 4.0"
gem "rspec-rails", "~> 6.0"
gem "shoulda-context", "~> 1.2.0"
gem "rails", "~> 7.0.1"
gem "sprockets-rails"
Expand Down
Loading

0 comments on commit 8fc832d

Please sign in to comment.