Skip to content

Commit

Permalink
Fixes 1378 - Add Ruby 3.1 and Rails 7.0 to the CI matrix (#1379)
Browse files Browse the repository at this point in the history
* Add Ruby 3.1 and Rails 7 to the CI matrix
* Adding Ruby 3.2
* Bump up patch versions
  • Loading branch information
petergoldstein authored Jan 12, 2023
1 parent d19ab43 commit 0ba80a1
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 15 deletions.
43 changes: 30 additions & 13 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,37 +26,54 @@ jobs:
fail-fast: false
matrix:
ruby:
- 2.6.6
- 2.7.2
- 3.0.0
- 2.6
- 2.7
- '3.0'
- 3.1
- 3.2
rails:
- 6.1.3.1
- 6.0.3.4
- 5.2.4.4
- 7.0.4
- 6.1.7
- 6.0.6
- 5.2.8.1
- 5.1.7
database_url:
- postgresql://postgres:password@localhost:5432/test
- sqlite3:test_db
exclude:
- ruby: 3.0.0
rails: 6.0.3.4
- ruby: 3.0.0
rails: 5.2.4.4
- ruby: 3.0.0
- ruby: 3.2
rails: 6.0.6
- ruby: 3.2
rails: 5.2.8.1
- ruby: 3.2
rails: 5.1.7
- ruby: 3.1
rails: 6.0.6
- ruby: 3.1
rails: 5.2.8.1
- ruby: 3.1
rails: 5.1.7
- ruby: '3.0'
rails: 6.0.6
- ruby: '3.0'
rails: 5.2.8.1
- ruby: '3.0'
rails: 5.1.7
- ruby: 2.6
rails: 7.0.4
- database_url: postgresql://postgres:password@localhost:5432/test
rails: 5.1.7
env:
RAILS_VERSION: ${{ matrix.rails }}
DATABASE_URL: ${{ matrix.database_url }}
name: Ruby ${{ matrix.ruby }} Rails ${{ matrix.rails }} DB ${{ matrix.database_url }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
- name: Install dependencies
run: bundle install --jobs 4 --retry 3
- name: Run tests
run: bundle exec rake test
run: bundle exec rake test
2 changes: 1 addition & 1 deletion test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class TestApp < Rails::Application
config.active_support.halt_callback_chains_on_return_false = false
config.active_record.time_zone_aware_types = [:time, :datetime]
config.active_record.belongs_to_required_by_default = false
unless Rails::VERSION::MAJOR == 5 && Rails::VERSION::MINOR < 2 || Rails::VERSION::MAJOR == 6 && Rails::VERSION::MINOR >= 1
if Rails::VERSION::MAJOR == 5 && Rails::VERSION::MINOR == 2
config.active_record.sqlite3.represent_boolean_as_integer = true
end
end
Expand Down
5 changes: 4 additions & 1 deletion test/unit/resource/resource_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,10 @@ def test_derived_not_abstract
end

def test_inherited_calls_superclass
assert_equal(BaseResource.subclasses, [PersonResource, SpecialBaseResource])
subclasses = BaseResource.subclasses
assert_includes(subclasses, PersonResource)
assert_includes(subclasses, SpecialBaseResource)
assert_equal(2, subclasses.size)
end

def test_nil_model_class
Expand Down

0 comments on commit 0ba80a1

Please sign in to comment.