Skip to content

Dual Boot RailsBump.org with Rails 8.0 and Rails 8.1 and run 2 test suite jobs #150

Merged
JuanVqz merged 2 commits intomainfrom
feature/dual-boot-rails-8-1
Mar 24, 2026
Merged

Dual Boot RailsBump.org with Rails 8.0 and Rails 8.1 and run 2 test suite jobs #150
JuanVqz merged 2 commits intomainfrom
feature/dual-boot-rails-8-1

Conversation

@etagwerker
Copy link
Copy Markdown
Member

Hi there,

This PR:

  • Adds dual-boot CI matrix for Rails 8.0 and 8.1
  • Runs the test suite against both Gemfile (Rails 8.0) andGemfile.next (Rails 8.1) in parallel using a GitHub Actions
    matrix strategy with fail-fast disabled.

Please check it out.

Thanks!

etagwerker and others added 2 commits March 21, 2026 11:30
- 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>
@etagwerker etagwerker changed the title Feature/dual boot rails 8 1 Dual Boot RailsBump.org with Rails 8.0 and Rails 8.1 and run 2 test suite jobs Mar 21, 2026
@sentry
Copy link
Copy Markdown

sentry bot commented Mar 21, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.88%. Comparing base (b945c45) to head (79d3c3b).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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=Gemfile and BUNDLE_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"
Copy link

Copilot AI Mar 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
gem "rails-i18n", "~> 8.x"
gem "rails-i18n", "~> 8.0"

Copilot uses AI. Check for mistakes.
Comment on lines 63 to +69
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: .ruby-version
bundler-cache: true
env:
BUNDLE_GEMFILE: ${{ matrix.gemfile }}
Copy link

Copilot AI Mar 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is what you did 🤔

Copy link
Copy Markdown
Member

@JuanVqz JuanVqz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've never seeing adding X in the version, is this a typo?

Suggested change
gem "rails-i18n", "~> 8.x"
gem "rails-i18n", "~> 8.x"

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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:

Screenshot 2026-03-24 at 10 11 31 AM

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TIL

@JuanVqz JuanVqz self-requested a review March 24, 2026 06:09
Copy link
Copy Markdown
Member

@JuanVqz JuanVqz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Ran the rails console for next
  2. Ran the rails server for next
  3. All tests passed for next

LGTM

@JuanVqz JuanVqz merged commit 711be1d into main Mar 24, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants