Skip to content

Commit

Permalink
Run CI against rails 7.2 (#138)
Browse files Browse the repository at this point in the history
* Run CI against Rails 7.2

* Reorganize Gemfiles

if a specific version of rails require corresponding gem version, it should be in each Gemfile under gemfiles/

* Add exception to test matrix
  • Loading branch information
ohbarye committed Aug 20, 2024
1 parent c084a69 commit 0aa7633
Show file tree
Hide file tree
Showing 6 changed files with 66 additions and 19 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,21 @@ jobs:
fail-fast: false
matrix:
ruby: [2.7, '3.0', 3.1, 3.2, 3.3, jruby-9.4]
rails: ['7.0', 7.1, main]
rails: ['7.0', 7.1, 7.2, main]

exclude:
# Rails 7.1 dropped support for older rubygems
- rails: 7.2
ruby: 2.7
- rails: 7.2
ruby: 3.0
- rails: main
ruby: 2.7
- rails: main
ruby: 3.0
# JDBC adapters don't support the latest Rails
- rails: 7.2
ruby: jruby-9.4
- rails: main
ruby: jruby-9.4

Expand Down
18 changes: 0 additions & 18 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,26 +13,8 @@ group :development do
end

group :test do
# JDBC versions track Rails versions
if ENV['RAILS_VERSION'] == '7.0'
gem 'activerecord-jdbcsqlite3-adapter', '~> 70.0', platform: :jruby
elsif ENV['RAILS_VERSION'] == '7.1'
gem 'activerecord-jdbc-adapter', '~> 71.0',
platform: :jruby,
# this is not published for some reason
git: 'https://github.com/jruby/activerecord-jdbc-adapter',
glob: 'activerecord-jdbc-adapter.gemspec'
gem 'activerecord-jdbcsqlite3-adapter', '~> 71.0',
platform: :jruby,
# this is not published for some reason
git: 'https://github.com/jruby/activerecord-jdbc-adapter',
glob: 'activerecord-jdbcsqlite3-adapter/activerecord-jdbcsqlite3-adapter.gemspec'
end

gem 'bcrypt'
gem 'rspec-rails'
# last supported version of sqlite3 for minimum ruby
gem 'sqlite3', '~> 1.6.0', platform: :ruby
gem 'webmock'
end

Expand Down
7 changes: 7 additions & 0 deletions gemfiles/rails-7.0.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,10 @@
eval_gemfile '../Gemfile'

gem 'rails', '~> 7.0.0'

group :test do
# JDBC versions track Rails versions
gem 'activerecord-jdbcsqlite3-adapter', '~> 70.0', platform: :jruby
# last supported version of sqlite3 for minimum ruby
gem 'sqlite3', '~> 1.6.0', platform: :ruby
end
16 changes: 16 additions & 0 deletions gemfiles/rails-7.1.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,19 @@
eval_gemfile '../Gemfile'

gem 'rails', '~> 7.1.0'

group :test do
# JDBC versions track Rails versions
gem 'activerecord-jdbc-adapter', '~> 71.0',
platform: :jruby,
# this is not published for some reason
git: 'https://github.com/jruby/activerecord-jdbc-adapter',
glob: 'activerecord-jdbc-adapter.gemspec'
gem 'activerecord-jdbcsqlite3-adapter', '~> 71.0',
platform: :jruby,
# this is not published for some reason
git: 'https://github.com/jruby/activerecord-jdbc-adapter',
glob: 'activerecord-jdbcsqlite3-adapter/activerecord-jdbcsqlite3-adapter.gemspec'
# last supported version of sqlite3 for minimum ruby
gem 'sqlite3', '~> 1.6.0', platform: :ruby
end
21 changes: 21 additions & 0 deletions gemfiles/rails-7.2.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# frozen_string_literal: true

eval_gemfile '../Gemfile'

gem 'rails', '~> 7.2.0'

group :test do
# JDBC versions track Rails versions
gem 'activerecord-jdbc-adapter', '~> 71.0',
platform: :jruby,
# this is not published for some reason
git: 'https://github.com/jruby/activerecord-jdbc-adapter',
glob: 'activerecord-jdbc-adapter.gemspec'
gem 'activerecord-jdbcsqlite3-adapter', '~> 71.0',
platform: :jruby,
# this is not published for some reason
git: 'https://github.com/jruby/activerecord-jdbc-adapter',
glob: 'activerecord-jdbcsqlite3-adapter/activerecord-jdbcsqlite3-adapter.gemspec'
# last supported version of sqlite3 for minimum ruby
gem 'sqlite3', '~> 1.6.0', platform: :ruby
end
15 changes: 15 additions & 0 deletions gemfiles/rails-main.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,18 @@
eval_gemfile '../Gemfile'

gem 'rails', github: 'rails/rails'

group :test do
# JDBC versions track Rails versions
gem 'activerecord-jdbc-adapter', '~> 71.0',
platform: :jruby,
# this is not published for some reason
git: 'https://github.com/jruby/activerecord-jdbc-adapter',
glob: 'activerecord-jdbc-adapter.gemspec'
gem 'activerecord-jdbcsqlite3-adapter', '~> 71.0',
platform: :jruby,
# this is not published for some reason
git: 'https://github.com/jruby/activerecord-jdbc-adapter',
glob: 'activerecord-jdbcsqlite3-adapter/activerecord-jdbcsqlite3-adapter.gemspec'
gem 'sqlite3', '~> 2.0.0', platform: :ruby
end

0 comments on commit 0aa7633

Please sign in to comment.