From 4698d585332c3972edd9bc7cc09ab2d4091063a5 Mon Sep 17 00:00:00 2001 From: Jan Graichen Date: Thu, 27 Nov 2025 13:12:43 +0100 Subject: [PATCH 1/3] chore: Add support for Rails 8.1 --- .github/workflows/ci.yml | 9 ++++++--- Gemfile | 2 +- Gemfile.rails-8-1 | 5 +++++ active_record_upsert.gemspec | 2 +- 4 files changed, 13 insertions(+), 5 deletions(-) create mode 100644 Gemfile.rails-8-1 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a27acb7..53c3be5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,10 +2,10 @@ name: CI on: pull_request: - types: [ opened, reopened, synchronize ] + types: [opened, reopened, synchronize] push: branches: - - 'main' + - "main" jobs: test: @@ -56,7 +56,10 @@ jobs: - ruby-version: "3.3" gemfile: Gemfile.rails-8-0 experimental: false - - ruby-version: "3.3" + - ruby-version: "3.4" + gemfile: Gemfile.rails-8-1 + experimental: false + - ruby-version: "3.4" gemfile: Gemfile.rails-main experimental: true diff --git a/Gemfile b/Gemfile index ef5296b..ca0b4bc 100644 --- a/Gemfile +++ b/Gemfile @@ -1 +1 @@ -eval_gemfile "#{__dir__}/Gemfile.rails-8-0" +eval_gemfile "#{__dir__}/Gemfile.rails-8-1" diff --git a/Gemfile.rails-8-1 b/Gemfile.rails-8-1 new file mode 100644 index 0000000..729f673 --- /dev/null +++ b/Gemfile.rails-8-1 @@ -0,0 +1,5 @@ +group :development, :test do +gem 'rails', '~> 8.1.0' +end + +eval_gemfile "#{__dir__}/Gemfile.base" diff --git a/active_record_upsert.gemspec b/active_record_upsert.gemspec index f8617df..fc20ffa 100644 --- a/active_record_upsert.gemspec +++ b/active_record_upsert.gemspec @@ -21,6 +21,6 @@ Gem::Specification.new do |spec| spec.platform = Gem::Platform::RUBY - spec.add_runtime_dependency 'activerecord', '>= 5.2', '< 8.1' + spec.add_runtime_dependency 'activerecord', '>= 5.2', '< 8.2' spec.add_runtime_dependency 'pg', '>= 0.18', '< 2.0' end From 17ab56c959193db16b93ee888a5ba4ed4d079b78 Mon Sep 17 00:00:00 2001 From: Jan Graichen Date: Thu, 27 Nov 2025 13:18:42 +0100 Subject: [PATCH 2/3] chore: Enable workflow dispatch to manually run CI Enables contributors to manually run the CI workflow on their fork even before opening a PR. For example: gh workflow run CI -r chore/rails-8-1 --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 53c3be5..bf624bd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,6 +6,7 @@ on: push: branches: - "main" + workflow_dispatch: jobs: test: From 941a1343bb39fb6ffa9f815c27c7740faa540063 Mon Sep 17 00:00:00 2001 From: Jan Graichen Date: Thu, 27 Nov 2025 13:22:20 +0100 Subject: [PATCH 3/3] chore: Enable colored output in Github CI Easier to read test result output. --- spec/spec_helper.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index b4a88fc..cd016bd 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -29,4 +29,9 @@ ActiveRecord::Tasks::DatabaseTasks.truncate_all end end + + if ENV.key?('GITHUB_ACTIONS') + config.color = true + config.tty = true + end end