Skip to content

Commit

Permalink
Test against Ruby 3.3, Rails 7.2, and Rails 7.1
Browse files Browse the repository at this point in the history
Also:
- Update checkout action
- Load correct sqlite3 version
- Set minimum required ruby version (according to Rails 6.0)
  • Loading branch information
tagliala committed Sep 15, 2024
1 parent 03d15c3 commit 2cd5677
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 3 deletions.
20 changes: 17 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,39 @@ jobs:
strategy:
fail-fast: false
matrix:
ruby: [3.2, 3.1, '3.0', 2.7, 2.6, ruby-head]
rails: ['7.0.0', '6.1.0', '6.0.0', main]
ruby: [3.3, 3.2, 3.1, '3.0', 2.7, 2.6, ruby-head]
rails: ['7.2.0', '7.1.0', '7.0.0', '6.1.0', '6.0.0', main]
exclude:
- ruby: ruby-head
rails: '7.0.0'
- ruby: ruby-head
rails: '6.1.0'
- ruby: ruby-head
rails: '6.0.0'
- ruby: 3.3
rails: '6.1.0'
- ruby: 3.3
rails: '6.0.0'
- ruby: 3.2
rails: '6.0.0'
- ruby: 3.1
rails: '6.0.0'
- ruby: 3.0
rails: main
- ruby: 3.0
rails: '7.2.0'
- ruby: 3.0
rails: '6.0.0'
- ruby: 2.7
rails: main
- ruby: 2.7
rails: '7.2.0'
- ruby: 2.6
rails: main
- ruby: 2.6
rails: '7.2.0'
- ruby: 2.6
rails: '7.1.0'
- ruby: 2.6
rails: '7.0.0'
- ruby: 2.6
Expand All @@ -40,7 +54,7 @@ jobs:
RAILS_VERSION: ${{ matrix.rails }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Ruby ${{ matrix.ruby }}
uses: ruby/setup-ruby@v1
with:
Expand Down
3 changes: 3 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
source 'https://rubygems.org'

rails_version = ENV['RAILS_VERSION'] || "default"
require_sqlite3_1x = %w[7.0.0 6.1.0 6.0.0].include?(rails_version)

rails =
case rails_version
when 'main'
Expand All @@ -12,5 +14,6 @@ rails =
end

gem 'rails', rails
gem 'sqlite3', '~> 1.3' if require_sqlite3_1x

gemspec
2 changes: 2 additions & 0 deletions jsonapi-rails.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ Gem::Specification.new do |spec|
spec.files = Dir['README.md', 'lib/**/*']
spec.require_path = 'lib'

spec.required_ruby_version = '>= 2.5.0'

spec.add_dependency 'jsonapi-rb', '~> 0.5.0'
spec.add_dependency 'jsonapi-parser', '~> 0.1.0'

Expand Down

0 comments on commit 2cd5677

Please sign in to comment.