Skip to content

Commit

Permalink
Add Rails 7.2 to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
westonganger committed Aug 20, 2024
1 parent 74b070c commit ad0706b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@ jobs:
RAILS_VERSION: "7.0"
- ruby: "3.3"
env:
RAILS_VERSION: "7.1"
rails_version: "7.1"
- ruby: "3.3"
env:
RAILS_VERSION: "7.2"

steps:
- uses: actions/checkout@v3
Expand Down
8 changes: 3 additions & 5 deletions test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,10 @@
require File.expand_path("../dummy_app/config/environment.rb", __FILE__)

migration_path = Rails.root.join('db/migrate')
if ActiveRecord.gem_version >= ::Gem::Version.new("6.0.0")
ActiveRecord::MigrationContext.new(migration_path, ActiveRecord::SchemaMigration).migrate
elsif ActiveRecord.gem_version >= ::Gem::Version.new("5.2.0")
ActiveRecord::MigrationContext.new(migration_path).migrate
if ActiveRecord::VERSION::MAJOR == 6
ActiveRecord::MigrationContext.new(File.expand_path(migration_path, __dir__), ActiveRecord::SchemaMigration).migrate
else
ActiveRecord::Migrator.migrate(migration_path)
ActiveRecord::MigrationContext.new(File.expand_path(migration_path, __dir__)).migrate
end

require "rails/test_help"
Expand Down

0 comments on commit ad0706b

Please sign in to comment.