Skip to content

fix: update Ruby, ActiveRecord matrix, and drop AR 6.x support#14

Open
scottybarr wants to merge 4 commits into
masterfrom
fix/ci-ruby-activerecord-updates
Open

fix: update Ruby, ActiveRecord matrix, and drop AR 6.x support#14
scottybarr wants to merge 4 commits into
masterfrom
fix/ci-ruby-activerecord-updates

Conversation

@scottybarr
Copy link
Copy Markdown

Summary

This PR fixes the broken CI on the pin-actions/2026-04-29 branch (and main, which has the same underlying issues) and bumps the gem to 3.2.0.

Root causes fixed

  • NameError: uninitialized constant MiniTest — a Rails 4.0.x compatibility shim in test_helper.rb referenced the old MiniTest constant, which was removed from modern minitest. This prevented any tests from loading at all.
  • NoMethodError: undefined method 'behavior='ActiveSupport::Deprecation.behavior= and .silenced= were removed in Rails 7.1+. Guarded both call sites with respond_to?.
  • NoMethodError: undefined method 'stub' — minitest 6 (which ships with Ruby 3.4+) removed mock/stub support entirely. Replaced with define_singleton_method.

Other changes

  • Bumped .ruby-version from 3.1.2 to 3.4.9
  • Updated actions/checkout v4.3.1 → v6.0.2 and ruby/setup-ruby v1.306.0 → v1.308.0 (Node.js 20 enforcement on GitHub Actions runners begins June 2, 2026)
  • Updated CI test matrix from ActiveRecord 6.1/7.0 to 7.2 and 8.1

ActiveRecord 6.x support

ActiveRecord 6.x is no longer included in the test matrix and is not actively supported going forward. The gem code itself has not changed, so it may continue to work with AR 6.x, but this is not guaranteed or tested. This is reflected in the minor version bump to 3.2.0.

Test plan

  • Both matrix jobs pass (AR 7.2 and AR 8.1)
  • Verified locally: ACTIVERECORD=7.2 bundle exec rake → 147 runs, 0 failures
  • Verified locally: ACTIVERECORD=8.1 bundle exec rake → 147 runs, 0 failures

…ails deprecation API

- Remove dead Rails 4.0.x shim that checked `MiniTest::Test`; modern
  minitest (5+) dropped the MiniTest constant in favour of Minitest,
  causing a NameError that prevented any test from loading
- Guard `ActiveSupport::Deprecation` calls with respond_to? since
  Rails 7.1+ removed .behavior= and .silenced= from the singleton
- Update actions/checkout from v4.3.1 to v6.0.2 and ruby/setup-ruby
  from v1.306.0 to v1.308.0 ahead of the June 2 2026 forced migration
  from Node.js 20 to 24 on GitHub Actions runners
minitest 6 (compatible with Ruby 3.4+) removed mock/stub support.
Replace the Object#stub call with define_singleton_method, which is
equivalent and has no framework dependency.
Both versions verified locally: 147 runs, 0 failures, 0 errors for each.
ActiveRecord 6.x is no longer included in the test matrix.
@scottybarr scottybarr changed the title Fix CI: update Ruby, ActiveRecord matrix, and drop AR 6.x support fix: update Ruby, ActiveRecord matrix, and drop AR 6.x support May 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant