Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Ruby 3, Rails 7 to CI matrix #494

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
172 changes: 144 additions & 28 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ jobs:
fail-fast: false
matrix:
ruby:
- 2.2
- 2.3
- 2.4
- 2.5
- 2.6
- 2.7
# - ruby-head
# - truffleruby-head
- 3.0
- 3.1
- 3.2
gemfile:
# These are located in the gemfiles/ folder
- rails42
Expand All @@ -32,30 +32,29 @@ jobs:
- rails52
- rails60
- rails61
- rails70
- rails42_haml
- rails50_haml
- rails51_haml
- rails52_haml
- rails60_haml
- rails61_haml
- rails70_haml
- rails42_boc
- rails50_boc
- rails51_boc
- rails52_boc
- rails60_boc
- rails61_boc
- rails70_boc
- rack
- rack_boc
# - pry09
# - pry10
# - pry11
exclude:
- { ruby: 2.2, gemfile: rails60 }
- { ruby: 2.2, gemfile: rails60_boc }
- { ruby: 2.2, gemfile: rails60_haml }
- { ruby: 2.2, gemfile: rails61 }
- { ruby: 2.2, gemfile: rails61_boc }
- { ruby: 2.2, gemfile: rails61_haml }
# Following https://www.fastruby.io/blog/ruby/rails/versions/compatibility-table.html
# to decide what to include.
- { ruby: 2.3, gemfile: rails42 }
- { ruby: 2.3, gemfile: rails42_boc }
- { ruby: 2.3, gemfile: rails42_haml }
Expand All @@ -65,6 +64,9 @@ jobs:
- { ruby: 2.3, gemfile: rails61 }
- { ruby: 2.3, gemfile: rails61_boc }
- { ruby: 2.3, gemfile: rails61_haml }
- { ruby: 2.3, gemfile: rails70 }
- { ruby: 2.3, gemfile: rails70_boc }
- { ruby: 2.3, gemfile: rails70_haml }
- { ruby: 2.4, gemfile: rails42 }
- { ruby: 2.4, gemfile: rails42_boc }
- { ruby: 2.4, gemfile: rails42_haml }
Expand All @@ -74,24 +76,99 @@ jobs:
- { ruby: 2.4, gemfile: rails61 }
- { ruby: 2.4, gemfile: rails61_boc }
- { ruby: 2.4, gemfile: rails61_haml }
- { ruby: 2.4, gemfile: rails70 }
- { ruby: 2.4, gemfile: rails70_boc }
- { ruby: 2.4, gemfile: rails70_haml }
- { ruby: 2.5, gemfile: rails42 }
- { ruby: 2.5, gemfile: rails42_boc }
- { ruby: 2.5, gemfile: rails42_haml }
- { ruby: 2.5, gemfile: rails70 }
- { ruby: 2.5, gemfile: rails70_boc }
- { ruby: 2.5, gemfile: rails70_haml }
- { ruby: 2.5, gemfile: rails50 }
- { ruby: 2.5, gemfile: rails50_boc }
- { ruby: 2.5, gemfile: rails50_haml }
- { ruby: 2.6, gemfile: rails42 }
- { ruby: 2.6, gemfile: rails42_boc }
- { ruby: 2.6, gemfile: rails42_haml }
- { ruby: 2.6, gemfile: rails50 }
- { ruby: 2.6, gemfile: rails50_boc }
- { ruby: 2.6, gemfile: rails50_haml }
- { ruby: 2.6, gemfile: rails51 }
- { ruby: 2.6, gemfile: rails51_boc }
- { ruby: 2.6, gemfile: rails51_haml }
- { ruby: 2.6, gemfile: rails52 }
- { ruby: 2.6, gemfile: rails52_boc }
- { ruby: 2.6, gemfile: rails52_haml }
- { ruby: 2.6, gemfile: rails60 }
- { ruby: 2.6, gemfile: rails60_boc }
- { ruby: 2.6, gemfile: rails60_haml }
- { ruby: 2.6, gemfile: rails70 }
- { ruby: 2.6, gemfile: rails70_boc }
- { ruby: 2.6, gemfile: rails70_haml }
- { ruby: 2.7, gemfile: rails42 }
- { ruby: 2.7, gemfile: rails42_boc }
- { ruby: 2.7, gemfile: rails42_haml }
# - { ruby: ruby-head, gemfile: rails42 }
# - { ruby: ruby-head, gemfile: rails42_boc }
# - { ruby: ruby-head, gemfile: rails42_haml }
- { ruby: truffleruby-head, gemfile: rails42_boc }
- { ruby: truffleruby-head, gemfile: rails50_boc }
- { ruby: truffleruby-head, gemfile: rails51_boc }
- { ruby: truffleruby-head, gemfile: rails52_boc }
- { ruby: truffleruby-head, gemfile: rails60_boc }
- { ruby: truffleruby-head, gemfile: rack_boc }
- { ruby: 2.7, gemfile: rails50 }
- { ruby: 2.7, gemfile: rails50_boc }
- { ruby: 2.7, gemfile: rails50_haml }
- { ruby: 2.7, gemfile: rails51 }
- { ruby: 2.7, gemfile: rails51_boc }
- { ruby: 2.7, gemfile: rails51_haml }
- { ruby: 2.7, gemfile: rails52 }
- { ruby: 2.7, gemfile: rails52_boc }
- { ruby: 2.7, gemfile: rails52_haml }
- { ruby: 2.7, gemfile: rails60 }
- { ruby: 2.7, gemfile: rails60_boc }
- { ruby: 2.7, gemfile: rails60_haml }
- { ruby: 3.0, gemfile: rails42 }
- { ruby: 3.0, gemfile: rails42_boc }
- { ruby: 3.0, gemfile: rails42_haml }
- { ruby: 3.0, gemfile: rails50 }
- { ruby: 3.0, gemfile: rails50_boc }
- { ruby: 3.0, gemfile: rails50_haml }
- { ruby: 3.0, gemfile: rails51 }
- { ruby: 3.0, gemfile: rails51_boc }
- { ruby: 3.0, gemfile: rails51_haml }
- { ruby: 3.0, gemfile: rails52 }
- { ruby: 3.0, gemfile: rails52_boc }
- { ruby: 3.0, gemfile: rails52_haml }
- { ruby: 3.0, gemfile: rails60 }
- { ruby: 3.0, gemfile: rails60_boc }
- { ruby: 3.0, gemfile: rails60_haml }
- { ruby: 3.1, gemfile: rails42 }
- { ruby: 3.1, gemfile: rails42_boc }
- { ruby: 3.1, gemfile: rails42_haml }
- { ruby: 3.1, gemfile: rails50 }
- { ruby: 3.1, gemfile: rails50_boc }
- { ruby: 3.1, gemfile: rails50_haml }
- { ruby: 3.1, gemfile: rails51 }
- { ruby: 3.1, gemfile: rails51_boc }
- { ruby: 3.1, gemfile: rails51_haml }
- { ruby: 3.1, gemfile: rails52 }
- { ruby: 3.1, gemfile: rails52_boc }
- { ruby: 3.1, gemfile: rails52_haml }
- { ruby: 3.1, gemfile: rails60 }
- { ruby: 3.1, gemfile: rails60_boc }
- { ruby: 3.1, gemfile: rails60_haml }
- { ruby: 3.2, gemfile: rails42 }
- { ruby: 3.2, gemfile: rails42_boc }
- { ruby: 3.2, gemfile: rails42_haml }
- { ruby: 3.2, gemfile: rails50 }
- { ruby: 3.2, gemfile: rails50_boc }
- { ruby: 3.2, gemfile: rails50_haml }
- { ruby: 3.2, gemfile: rails51 }
- { ruby: 3.2, gemfile: rails51_boc }
- { ruby: 3.2, gemfile: rails51_haml }
- { ruby: 3.2, gemfile: rails52 }
- { ruby: 3.2, gemfile: rails52_boc }
- { ruby: 3.2, gemfile: rails52_haml }
- { ruby: 3.2, gemfile: rails60 }
- { ruby: 3.2, gemfile: rails60_boc }
- { ruby: 3.2, gemfile: rails60_haml }

env:
BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile

steps:

Expand All @@ -101,23 +178,62 @@ jobs:
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true

- uses: actions/cache@v2
- name: Bundle install
run: |
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3

- name: RSpec
run: bundle exec rspec -f doc --color

test_older:
# Ruby 2.2 has a known issue on Ubuntu 22, so we must test it on Ubuntu 20
# https://github.com/ruby/setup-ruby/issues/496
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
ruby:
- 2.2
gemfile:
# These are located in the gemfiles/ folder
- rails42
- rails50
- rails51
- rails52
- rails42_haml
- rails50_haml
- rails51_haml
- rails52_haml
- rails42_boc
- rails50_boc
- rails51_boc
- rails52_boc
- rack
- rack_boc
# - pry09
# - pry10
# - pry11

env:
BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile

steps:

- uses: actions/checkout@v2

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
path: gemfiles/vendor/bundle
key: v3-${{ runner.os }}-branch-${{ github.ref }}-ruby-${{ matrix.ruby }}-gemfile-${{ matrix.gemfile }}-${{ hashFiles(format('gemfiles/{0}.gemfile', matrix.gemfile)) }}
restore-keys: |
v3-${{ runner.os }}-branch-${{ github.ref }}-ruby-${{ matrix.ruby }}-gemfile-${{ matrix.gemfile }}
v3-${{ runner.os }}-branch-master-ruby-${{ matrix.ruby }}-gemfile-${{ matrix.gemfile }}
ruby-version: ${{ matrix.ruby }}
bundler-cache: true

- name: Bundle install
run: |
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
env:
BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile

- name: RSpec
run: bundle exec rspec -f doc --color
env:
BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
2 changes: 1 addition & 1 deletion better_errors.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Gem::Specification.new do |s|

s.required_ruby_version = ">= 2.0.0"

s.add_development_dependency "rake", "~> 10.0"
s.add_development_dependency "rake", ">= 10.0"
s.add_development_dependency "rspec", "~> 3.5"
s.add_development_dependency "rspec-html-matchers"
s.add_development_dependency "rspec-its"
Expand Down
2 changes: 1 addition & 1 deletion gemfiles/rails61.gemfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
source "https://rubygems.org"

gem "rails", "~> 6.1.0rc"
gem "rails", "~> 6.1.0"

gem 'simplecov', require: false
gem 'simplecov-lcov', require: false
Expand Down
2 changes: 1 addition & 1 deletion gemfiles/rails61_boc.gemfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
source "https://rubygems.org"

gem "rails", "~> 6.1.0rc"
gem "rails", "~> 6.1.0"
gem "binding_of_caller"

gem 'simplecov', require: false
Expand Down
2 changes: 1 addition & 1 deletion gemfiles/rails61_haml.gemfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
source "https://rubygems.org"

gem "rails", "~> 6.1.0rc"
gem "rails", "~> 6.1.0"
gem "haml"

gem 'simplecov', require: false
Expand Down
8 changes: 8 additions & 0 deletions gemfiles/rails70.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
source "https://rubygems.org"

gem "rails", "~> 7.0.0"

gem 'simplecov', require: false
gem 'simplecov-lcov', require: false

gemspec path: "../"
9 changes: 9 additions & 0 deletions gemfiles/rails70_boc.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
source "https://rubygems.org"

gem "rails", "~> 7.0.0"
gem "binding_of_caller"

gem 'simplecov', require: false
gem 'simplecov-lcov', require: false

gemspec path: "../"
9 changes: 9 additions & 0 deletions gemfiles/rails70_haml.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
source "https://rubygems.org"

gem "rails", "~> 7.0.0"
gem "haml"

gem 'simplecov', require: false
gem 'simplecov-lcov', require: false

gemspec path: "../"