Skip to content

Commit

Permalink
test Rails 7.2 and Ruby 3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
khiav reoy committed Sep 9, 2024
1 parent 52e56b3 commit 4c23f7a
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 1 deletion.
20 changes: 20 additions & 0 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
- 2.7
- 3.0
- 3.1
- 3.2
gemfile:
- 3.2.gemfile
- 4.2.gemfile
Expand All @@ -34,6 +35,7 @@ jobs:
- 6.0.gemfile
- 6.1.gemfile
- 7.0.gemfile
- 7.2.gemfile
exclude:
- gemfile: 3.2.gemfile
ruby: 2.6
Expand All @@ -43,24 +45,34 @@ jobs:
ruby: 3.0
- gemfile: 3.2.gemfile
ruby: 3.1
- gemfile: 3.2.gemfile
ruby: 3.2
- gemfile: 4.2.gemfile
ruby: 2.7
- gemfile: 4.2.gemfile
ruby: 3.0
- gemfile: 4.2.gemfile
ruby: 3.1
- gemfile: 4.2.gemfile
ruby: 3.2
- gemfile: 5.0.gemfile
ruby: 3.0
- gemfile: 5.0.gemfile
ruby: 3.1
- gemfile: 5.0.gemfile
ruby: 3.2
- gemfile: 5.1.gemfile
ruby: 3.0
- gemfile: 5.1.gemfile
ruby: 3.1
- gemfile: 5.1.gemfile
ruby: 3.2
- gemfile: 5.2.gemfile
ruby: 3.0
- gemfile: 5.2.gemfile
ruby: 3.1
- gemfile: 5.2.gemfile
ruby: 3.2
- gemfile: 6.0.gemfile
ruby: 2.3
- gemfile: 6.1.gemfile
Expand All @@ -69,6 +81,14 @@ jobs:
ruby: 2.3
- gemfile: 7.0.gemfile
ruby: 2.6
- gemfile: 7.2.gemfile
ruby: 2.3
- gemfile: 7.2.gemfile
ruby: 2.6
- gemfile: 7.2.gemfile
ruby: 2.7
- gemfile: 7.2.gemfile
ruby: 3.0
env:
BUNDLE_GEMFILE: "gemfiles/${{ matrix.gemfile }}"

Expand Down
11 changes: 11 additions & 0 deletions gemfiles/7.2.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
source 'https://rubygems.org'

gem 'zeitwerk'
gem 'activerecord', '~> 7.2.1'

group :test do
gem 'simplecov', '< 0.18'
gem 'sqlite3', '~> 1.4.1'
end

gemspec path: '../'
7 changes: 6 additions & 1 deletion test/lib/models/user.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
# frozen_string_literal: true

class User < ActiveRecord::Base
serialize :serialized_attribute, Hash
if Gem::Version.new(ActiveRecord::VERSION::STRING) < Gem::Version.new('7.1.0')
serialize :serialized_attribute, Hash
else
serialize :serialized_attribute, type: Hash
end

has_many :posts
has_many :sent_messages, class_name: 'UserMessage', foreign_key: :sender_user_id, dependent: :destroy
has_many :received_messages, class_name: 'UserMessage', foreign_key: :receiver_user_id, dependent: :destroy
Expand Down

0 comments on commit 4c23f7a

Please sign in to comment.