Test against Rails 7.2–edge and Ruby 3.4–4.0#72
Conversation
flavorjones
commented
Mar 10, 2026
- Add Appraisal gem for Rails version matrix testing
- Update GitHub Actions CI to test Ruby 3.4/4.0 × Rails 7.2/8.0/8.1/edge × sqlite/postgres/mysql
- Update .ruby-version to 4.0.1
- Pin minitest < 6 to avoid incompatibility with minitest 6.0
- Add ostruct as dev dependency for Ruby 4.0 compatibility
- Use fixture_paths= (plural) for Rails 7.2+ compatibility
- Update CI actions and service images
- Document Appraisal usage in README
There was a problem hiding this comment.
Pull request overview
Adds multi-version Rails testing support (via Appraisal) and expands CI to cover a Ruby/Rails/DB matrix aligned with upcoming Rails/Ruby compatibility changes.
Changes:
- Introduces Appraisal configuration + generated Rails-version Gemfiles for matrix testing.
- Updates CI workflow and dependencies (Ruby versions, Rails versions, DB service images, minitest pin, ostruct for Ruby 4).
- Adjusts test helper fixture configuration for Rails 7.2+ and documents Appraisal usage in the README.
Reviewed changes
Copilot reviewed 11 out of 13 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
test/test_helper.rb |
Switches to fixture_paths= for Rails 7.2+ fixture loading. |
test/dummy/db/schema.rb |
Updates schema format version (but currently has an incorrect schema migration version). |
gemfiles/rails_7_2.gemfile |
Appraisal-generated Gemfile for Rails 7.2 testing. |
gemfiles/rails_8_0.gemfile |
Appraisal-generated Gemfile for Rails 8.0 testing. |
gemfiles/rails_8_1.gemfile |
Appraisal-generated Gemfile for Rails 8.1 testing. |
gemfiles/rails_edge.gemfile |
Appraisal-generated Gemfile for Rails edge testing. |
README.md |
Documents how to run Appraisal-based test matrix locally. |
Gemfile.lock |
Updates resolved dependency set (Rails 8.1 baseline, adds appraisal/ostruct, pins minitest < 6). |
Gemfile |
Adds minitest < 6, appraisal, and ostruct for development/test tooling. |
Appraisals |
Defines Rails version appraisals (7.2, 8.0, 8.1, edge). |
.ruby-version |
Updates local Ruby version to 4.0.1. |
.gitignore |
Ignores per-appraisal lockfiles (gemfiles/*.gemfile.lock). |
.github/workflows/build.yml |
Expands CI into a Ruby/Rails/DB matrix and updates service images (but currently has workflow issues). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
| on: [push] | ||
| on: | ||
| push: | ||
| branches: [ master ] |
There was a problem hiding this comment.
The workflow is now only triggered on pushes to the master branch. Since this repo’s default branch appears to be main (per diff base), this will prevent CI from running on pushes to main. Update the branch filter to include main (or remove the branch filter) so pushes to the default branch still run CI.
| branches: [ master ] | |
| branches: [ main, master ] |
| matrix: | ||
| ruby-version: ['3.4', '4.0'] | ||
| rails-version: [rails_7_2, rails_8_0, rails_8_1, rails_edge] | ||
| database: [sqlite, postgres, mysql] |
There was a problem hiding this comment.
The tests job defines a Ruby version matrix (ruby-version: ['3.4', '4.0']), but later the job still sets up Ruby with a fixed version, so the matrix won’t actually run on both Rubies. Update the ruby/setup-ruby step to use the matrix value (e.g., matrix.ruby-version).
4cdadde to
dbf1632
Compare
- Add Appraisal gem for Rails version matrix testing - Update GitHub Actions CI to test Ruby 3.4/4.0 × Rails 7.2/8.0/8.1/edge × sqlite/postgres/mysql - Update .ruby-version to 4.0.1 - Pin minitest < 6 to avoid incompatibility with minitest 6.0 - Add ostruct as dev dependency for Ruby 4.0 compatibility - Use fixture_paths= (plural) for Rails 7.2+ compatibility - Update CI actions and service images - Document Appraisal usage in README
dbf1632 to
33155c2
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 12 out of 14 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.