diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 6f55f63..70c4a2e 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -25,6 +25,7 @@ jobs: - 2.7 - 3.0 - 3.1 + - 3.2 gemfile: - 3.2.gemfile - 4.2.gemfile @@ -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 @@ -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 @@ -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 }}" diff --git a/gemfiles/7.2.gemfile b/gemfiles/7.2.gemfile new file mode 100644 index 0000000..ba4a865 --- /dev/null +++ b/gemfiles/7.2.gemfile @@ -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: '../' diff --git a/test/lib/models/user.rb b/test/lib/models/user.rb index c3099eb..d1269cb 100644 --- a/test/lib/models/user.rb +++ b/test/lib/models/user.rb @@ -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