From b189979ad2625d843a7c879329aa9b89ba16c2f0 Mon Sep 17 00:00:00 2001 From: Sergio Cambra Date: Wed, 16 Oct 2024 16:53:53 +0200 Subject: [PATCH] fix testing against rails 6.1 ignore rails 8 testing, probably devise is not ready --- .github/workflows/ci.yml | 2 ++ test/orm/active_record.rb | 13 ++++++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index eed072a4..299a9314 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,6 +31,8 @@ jobs: orm: mongoid - rails: main orm: mongoid + - rails: main # many errors, probably devise issues + orm: active_record runs-on: 'ubuntu-latest' diff --git a/test/orm/active_record.rb b/test/orm/active_record.rb index b69705c0..61898a34 100644 --- a/test/orm/active_record.rb +++ b/test/orm/active_record.rb @@ -1,6 +1,13 @@ ActiveRecord::Migration.verbose = false ActiveRecord::Base.logger = Logger.new(nil) -ActiveRecord::MigrationContext.new( - File.expand_path('../../rails_app/db/migrate/', __FILE__) -).migrate \ No newline at end of file +if ActiveRecord::VERSION >= 7 + ActiveRecord::MigrationContext.new( + File.expand_path('../../rails_app/db/migrate/', __FILE__) + ).migrate +else # rails 6 + ActiveRecord::MigrationContext.new( + File.expand_path('../../rails_app/db/migrate/', __FILE__), + ActiveRecord::Base.connection.schema_migration + ).migrate +end \ No newline at end of file