Skip to content

Commit

Permalink
Merge pull request #11 from kzkn/add-new-versions-to-ci-matrix
Browse files Browse the repository at this point in the history
Add Ruby 3.4 and Rails 8.0 to CI matrix
  • Loading branch information
kzkn authored Jan 8, 2025
2 parents df4edb6 + 4e1c2ab commit 3070813
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,13 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
rails_version: [6.1.0, 7.0.0, 7.1.0, 7.2.0, main]
ruby_version: ['3.3', '3.2', '3.1']
rails_version: [6.1.0, 7.0.0, 7.1.0, 7.2.0, 8.0.0, main]
ruby_version: ['3.4', '3.3', '3.2', '3.1']
exclude:
- { ruby_version: '3.1', rails_version: main }
- { ruby_version: '3.1', rails_version: 8.0.0 }
- { ruby_version: '3.4', rails_version: 6.1.0 }
- { ruby_version: '3.4', rails_version: 7.0.0 }

steps:
- uses: actions/checkout@v4
Expand Down
12 changes: 8 additions & 4 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@ source "http://rubygems.org"
gemspec

rails_version = ENV['RAILS_VERSION'] || '>= 0'
rails_version = "~> #{rails_version}" if rails_version =~ /^\d/

gem 'rails', rails_version == 'main' ? { github: 'rails/rails' } : rails_version
gem 'sqlite3', rails_version == 'main' ? '>= 2.0' : '~> 1.4'
case rails_version
when 'main', '>= 0'
gem 'rails', rails_version == 'main' ? { github: 'rails/rails' } : rails_version
gem 'sqlite3', '>= 2.0'
else
gem 'rails', "~> #{rails_version}"
gem 'sqlite3', rails_version < '8' ? '~> 1.4' : '>= 2.0'
end

0 comments on commit 3070813

Please sign in to comment.