-
-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test against Rails 8.0 #540
Conversation
WalkthroughThis pull request introduces updates to GitHub Actions workflows and Gemfiles to support testing with Rails 8.0.x. The changes include adding a new Gemfile for Rails 8.0.x, updating the testing matrix in GitHub Actions workflows, and modifying Changes
Possibly related PRs
Suggested reviewers
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
0f11e01
to
78954f5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you rebase with main branch now the other bits are merged and I'll merge this one? @tagliala
Additionally, update rspec-rails in Rails >= 7.0 gemspecs
78954f5
to
e5fafae
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (2)
gemfiles/Gemfile-rails.8.0.x (1)
8-11
: Consider adding version constraints for development dependenciesWhile the gem versions are consistent with other Gemfiles, consider adding upper version bounds for development dependencies to prevent unexpected issues.
-gem "rake", ">= 11.1" +gem "rake", "~> 13.0", ">= 11.1" -gem "byebug" +gem "byebug", "~> 11.0".github/workflows/ruby.yml (1)
Line range hint
1-1
: Fix pipeline warning about default branch.The pipeline shows a warning about using the deprecated 'master' branch name. Consider updating the repository settings to use 'main' as the default branch name.
🧰 Tools
🪛 GitHub Actions: Generator specs
[warning] Using deprecated 'master' as default branch name. Consider configuring init.defaultBranch to use 'main', 'trunk', or 'development' instead.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (6)
.github/workflows/generator.yml
(1 hunks).github/workflows/ruby.yml
(1 hunks)gemfiles/Gemfile-rails.7.0.x
(1 hunks)gemfiles/Gemfile-rails.7.1.x
(1 hunks)gemfiles/Gemfile-rails.7.2.x
(1 hunks)gemfiles/Gemfile-rails.8.0.x
(1 hunks)
🧰 Additional context used
🪛 GitHub Actions: Generator specs
.github/workflows/ruby.yml
[warning] Using deprecated 'master' as default branch name. Consider configuring init.defaultBranch to use 'main', 'trunk', or 'development' instead.
.github/workflows/generator.yml
[warning] Using deprecated 'master' as default branch name. Consider configuring init.defaultBranch to use 'main', 'trunk', or 'development' instead.
🔇 Additional comments (9)
gemfiles/Gemfile-rails.7.0.x (1)
10-10
: Verify compatibility with rspec-rails 7.0The upgrade to rspec-rails 7.0 is significant. Let's verify the compatibility requirements.
✅ Verification successful
The upgrade to rspec-rails 7.0 is compatible with Rails 7.0
The gemspec confirms that rspec-rails 7.x is explicitly designed to work with Rails 7.0 and above. No significant compatibility issues were found between rspec-rails 7.0 and Rails 7.0.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Check rspec-rails compatibility requirements curl -s https://rubygems.org/api/v1/versions/rspec-rails.json | jq -r '.[] | select(.number | startswith("7.")) | .number' | head -n 1 # Check for any reported issues with Rails 7.0 gh api graphql -f query=' { search(query: "repo:rspec/rspec-rails is:issue Rails 7.0", type: ISSUE, first: 5) { nodes { ... on Issue { title state url } } } }'Length of output: 1080
Script:
#!/bin/bash # Check rspec-rails dependencies and release notes curl -s "https://raw.githubusercontent.com/rspec/rspec-rails/main/rspec-rails.gemspec" | grep -A 5 "spec.add_runtime_dependency" # Get changelog entries for 7.x curl -s "https://raw.githubusercontent.com/rspec/rspec-rails/main/Changelog.md" | awk '/^## 7\./{p=1}/^## 6\./{p=0}p'Length of output: 244
Script:
#!/bin/bash # Fetch gemspec content using GitHub API gh api \ -H "Accept: application/vnd.github.raw" \ /repos/rspec/rspec-rails/contents/rspec-rails.gemspec # Search for Rails version requirements in the repository rg -i "rails.*dependency|rails.*requirement" --type rubyLength of output: 2630
gemfiles/Gemfile-rails.7.1.x (1)
10-10
: LGTM! Consistent with Rails 7.0.x changesThe update to rspec-rails "~> 7.0" maintains consistency across Rails 7.x versions.
gemfiles/Gemfile-rails.7.2.x (1)
10-10
: LGTM! Maintains consistency across Rails 7.x seriesThe update to rspec-rails "~> 7.0" is consistent with other Rails 7.x Gemfiles.
gemfiles/Gemfile-rails.8.0.x (2)
1-11
: LGTM! Successfully implements Rails 8.0 testing supportThe new Gemfile successfully implements the PR objective of adding Rails 8.0 testing support while maintaining consistency with existing Gemfiles.
7-7
: Verify Rails 8.0 compatibility with dependent gemsSince Rails 8.0 is a major version upgrade, we should verify compatibility with other gems in the Gemfile.
✅ Verification successful
Dependencies are compatible with Rails 8.0
The Gemfile configuration is consistent with other version-specific Gemfiles and all key dependencies are compatible:
- rspec-rails 7.1.0 supports Rails 8.0
- rack-proxy 0.7.7 and other dependencies have no version conflicts
- Gemfile structure follows the established pattern from other Rails version Gemfiles
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Check Rails 8.0 requirements and compatibility curl -s https://rubygems.org/api/v1/versions/rails.json | jq -r '.[] | select(.number | startswith("8.")) | .number' | head -n 1 # Check for any compatibility issues with rack-proxy curl -s https://rubygems.org/api/v1/versions/rack-proxy.json | jq -r 'map(select(.prerelease == false)) | .[0].number'Length of output: 263
Script:
#!/bin/bash # Check rspec-rails versions and dependencies curl -s https://rubygems.org/api/v1/versions/rspec-rails.json | jq -r 'map(select(.prerelease == false)) | .[0] | {number, built_at}' # List all gems in the Rails 8.0 Gemfile cat gemfiles/Gemfile-rails.8.0.x # Check for any Rails version specific requirements in other Gemfiles fd Gemfile --exec grep -H "rails" {}Length of output: 2612
.github/workflows/generator.yml (2)
28-28
: LGTM! Rails 8.0.x test matrix addition.The addition of Rails 8.0.x testing is properly configured in the matrix.
🧰 Tools
🪛 GitHub Actions: Generator specs
[warning] Using deprecated 'master' as default branch name. Consider configuring init.defaultBranch to use 'main', 'trunk', or 'development' instead.
35-36
: Verify Ruby version compatibility with Rails 8.0The exclusions for Ruby 2.7, 3.0, and 3.1 with Rails 8.0.x follow the same pattern as Rails 7.2.x exclusions, which is good. However, let's verify these exclusions against Rails 8.0's official Ruby version requirements.
Also applies to: 39-40, 43-44
🧰 Tools
🪛 GitHub Actions: Generator specs
[warning] Using deprecated 'master' as default branch name. Consider configuring init.defaultBranch to use 'main', 'trunk', or 'development' instead.
.github/workflows/ruby.yml (2)
46-46
: LGTM! Consistent Rails 8.0.x configuration.The Rails 8.0.x test matrix addition matches the configuration in generator.yml, maintaining consistency across workflows.
🧰 Tools
🪛 GitHub Actions: Generator specs
[warning] Using deprecated 'master' as default branch name. Consider configuring init.defaultBranch to use 'main', 'trunk', or 'development' instead.
53-54
: LGTM! Matching exclusion rules.The Ruby version exclusions for Rails 8.0.x are identical to generator.yml, ensuring consistent testing behavior across workflows.
Also applies to: 57-58, 61-62
🧰 Tools
🪛 GitHub Actions: Generator specs
[warning] Using deprecated 'master' as default branch name. Consider configuring init.defaultBranch to use 'main', 'trunk', or 'development' instead.
FindingsRef: tagliala#5 Failing specs:
Failures are random. Second run:
|
Generator specs are temperamental but this LGTM so I'll merge and investigate the job failures separately |
The problem should be related to the huge number of requests to Ref: https://github.com/tagliala/shakapacker/actions/runs/12670742912/job/35311027351
|
Summary
Pull Request checklist
Other Information
Summary by CodeRabbit
Release Notes
New Features
Chores
Testing