Skip to content

Commit

Permalink
Add Rails 8 build to the CI
Browse files Browse the repository at this point in the history
Rails 8 has been released. Test our gem works against it on the CI.

Didn't add a JRuby build because the last one targets Ruby 3.1
compatibility and Rails 8 targets Ruby >= 3.2.
  • Loading branch information
tombruijn committed Nov 8, 2024
1 parent bde88e4 commit e4d8b25
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 1 deletion.
56 changes: 55 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# This is a generated file by the `rake build_matrix:github:generate` task.
# See `build_matrix.yml` for the build matrix.
# Generate this file with `rake build_matrix:github:generate`.
# Generated job count: 122
# Generated job count: 124
---
name: Ruby gem CI
'on':
Expand Down Expand Up @@ -534,6 +534,33 @@ jobs:
JRUBY_OPTS: ''
COV: '1'
BUNDLE_GEMFILE: gemfiles/rails-7.2.gemfile
ruby_3-3-4__rails-8-0_ubuntu-latest:
name: Ruby 3.3.4 - rails-8.0
needs: ruby_3-3-4_ubuntu-latest
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Install Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.3.4
bundler-cache: true
- name: Install gem extension
run: "./script/bundler_wrapper exec rake extension:install"
- name: Print extension install report
run: "[ -e ext/install.report ] && cat ext/install.report || echo 'No ext/install.report
file found'"
- name: Print Makefile log file
run: "[ -f ext/mkmf.log ] && cat ext/mkmf.log || echo 'No ext/mkmf.log file
found'"
- name: Run tests
run: "./script/bundler_wrapper exec rake test"
env:
RAILS_ENV: test
JRUBY_OPTS: ''
COV: '1'
BUNDLE_GEMFILE: gemfiles/rails-8.0.gemfile
ruby_3-3-4__sequel_ubuntu-latest:
name: Ruby 3.3.4 - sequel
needs: ruby_3-3-4_ubuntu-latest
Expand Down Expand Up @@ -1159,6 +1186,33 @@ jobs:
JRUBY_OPTS: ''
COV: '1'
BUNDLE_GEMFILE: gemfiles/rails-7.2.gemfile
ruby_3-2-5__rails-8-0_ubuntu-latest:
name: Ruby 3.2.5 - rails-8.0
needs: ruby_3-2-5_ubuntu-latest
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Install Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2.5
bundler-cache: true
- name: Install gem extension
run: "./script/bundler_wrapper exec rake extension:install"
- name: Print extension install report
run: "[ -e ext/install.report ] && cat ext/install.report || echo 'No ext/install.report
file found'"
- name: Print Makefile log file
run: "[ -f ext/mkmf.log ] && cat ext/mkmf.log || echo 'No ext/mkmf.log file
found'"
- name: Run tests
run: "./script/bundler_wrapper exec rake test"
env:
RAILS_ENV: test
JRUBY_OPTS: ''
COV: '1'
BUNDLE_GEMFILE: gemfiles/rails-8.0.gemfile
ruby_3-2-5__sequel_ubuntu-latest:
name: Ruby 3.2.5 - sequel
needs: ruby_3-2-5_ubuntu-latest
Expand Down
6 changes: 6 additions & 0 deletions build_matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ matrix:
- "rails-7.0"
- "rails-7.1"
- "rails-7.2"
- "rails-8.0"

ruby:
- ruby: "3.3.4"
Expand Down Expand Up @@ -179,6 +180,11 @@ matrix:
- "3.2.5"
- "3.1.6"
- "jruby-9.4.7.0"
- gem: "rails-8.0"
only:
ruby:
- "3.3.4"
- "3.2.5"
- gem: "sequel"
- gem: "sinatra"
- gem: "webmachine2"
Expand Down
7 changes: 7 additions & 0 deletions gemfiles/rails-8.0.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
source "https://rubygems.org"

gem "rails", "~> 8.0.0"
gem "rake"
gem "sidekiq"

gemspec :path => "../"

0 comments on commit e4d8b25

Please sign in to comment.