Dual Boot RailsBump.org with Rails 8.0 and Rails 8.1 and run 2 test suite jobs #150
Dual Boot RailsBump.org with Rails 8.0 and Rails 8.1 and run 2 test suite jobs #150
Conversation
- Update load_defaults from 7.1 to 8.0 (incrementally: 7.1 → 7.2 → 8.0) - Remove redundant config.active_support.to_time_preserves_timezone = :zone (now the default in load_defaults 8.0) - Add next_rails gem and initialize dual-boot with Gemfile.next - Add next? conditional for rails and rails-i18n gems (8.0.x for current, 8.1.x for next) All 169 tests pass on both Rails 8.0.3 and Rails 8.1.2. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Run the test suite against both Gemfile (Rails 8.0) and Gemfile.next (Rails 8.1) in parallel using a GitHub Actions matrix strategy with fail-fast disabled. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #150 +/- ##
=======================================
Coverage 86.88% 86.88%
=======================================
Files 48 48
Lines 694 694
=======================================
Hits 603 603
Misses 91 91 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR enables a dual-boot setup to run RailsBump.org’s CI test suite against both Rails 8.0 and Rails 8.1 by introducing a GitHub Actions matrix and adding the necessary Gemfile/lockfile wiring.
Changes:
- Add a CI matrix to run tests with
BUNDLE_GEMFILE=GemfileandBUNDLE_GEMFILE=Gemfile.next(fail-fast disabled). - Introduce dual-boot Gemfile logic to select Rails 8.0 vs 8.1, plus add
Gemfile.next.lock. - Update application defaults to Rails 8.0.
Reviewed changes
Copilot reviewed 4 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
config/application.rb |
Updates Rails defaults baseline to 8.0 for the app configuration. |
Gemfile |
Adds dual-boot conditional dependencies and introduces next_rails. |
Gemfile.lock |
Updates lockfile to include next_rails and associated dependencies. |
Gemfile.next |
Adds the alternate Gemfile entrypoint used by CI matrix runs. |
Gemfile.next.lock |
Adds lockfile for the Rails 8.1 dependency set. |
.github/workflows/test.yml |
Adds matrix strategy and applies BUNDLE_GEMFILE per job/step to run both suites. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| gem "rails-i18n", "~> 8.0.0" | ||
| if next? | ||
| gem "rails", "~> 8.1.0" | ||
| gem "rails-i18n", "~> 8.x" |
There was a problem hiding this comment.
The version constraint "~> 8.x" for rails-i18n is non-standard/ambiguous and can lead to surprising resolution behavior. Prefer an explicit semver range (e.g., "~> 8.0" for any 8.x, or ">= 8.0", "< 9") to clearly communicate intent and keep Bundler resolution predictable.
| gem "rails-i18n", "~> 8.x" | |
| gem "rails-i18n", "~> 8.0" |
| - name: Set up Ruby | ||
| uses: ruby/setup-ruby@v1 | ||
| with: | ||
| ruby-version: .ruby-version | ||
| bundler-cache: true | ||
| env: | ||
| BUNDLE_GEMFILE: ${{ matrix.gemfile }} |
There was a problem hiding this comment.
BUNDLE_GEMFILE is being repeated across multiple steps. Consider setting env: BUNDLE_GEMFILE: ${{ matrix.gemfile }} at the job level so it automatically applies to all steps (including any future ones) and avoids accidentally running a step against the wrong Gemfile.
JuanVqz
left a comment
There was a problem hiding this comment.
Did you update using the Claude skill? I'm willing to use it 😊 good job
| gem "rails-i18n", "~> 8.0.0" | ||
| if next? | ||
| gem "rails", "~> 8.1.0" | ||
| gem "rails-i18n", "~> 8.x" |
There was a problem hiding this comment.
I've never seeing adding X in the version, is this a typo?
| gem "rails-i18n", "~> 8.x" | |
| gem "rails-i18n", "~> 8.x" |
There was a problem hiding this comment.
@JuanVqz When I reviewed these changes I was a little surprised by that too!
Apparently it is a thing to use x as a wildcard:
JuanVqz
left a comment
There was a problem hiding this comment.
- Ran the rails console for next
- Ran the rails server for next
- All tests passed for next
LGTM
Hi there,
This PR:
matrix strategy with fail-fast disabled.
Please check it out.
Thanks!