Skip to content
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

Bump ruby versions on test jobs #927

Merged
merged 3 commits into from
May 12, 2024

Conversation

m-nakamura145
Copy link
Contributor

Use latest ruby versions on test jobs

.github/workflows/build.yml Outdated Show resolved Hide resolved
Co-authored-by: Ewoud Kohl van Wijngaarden <[email protected]>
@ekohl
Copy link
Member

ekohl commented May 10, 2024

I have never seen this before in a Gemfile:

ruby(ENV['RUBY_VERSION'] || '3.2.2')

Reading https://bundler.io/v2.5/man/gemfile.5.html#RUBY I don't really see the point of this. There is already a declaration for compatible versions here:

s.required_ruby_version = '>= 2.6.0'

So I'd propose to drop that line from the Gemfile.

@m-nakamura145
Copy link
Contributor Author

@ekohl I agree with you. removed 733193d

@@ -5,7 +5,6 @@ source 'https://rubygems.org'
gemspec path: '.'

# use ENV vars, with default value as fallback for local setup
ruby(ENV['RUBY_VERSION'] || '3.2.2')
Copy link
Collaborator

Choose a reason for hiding this comment

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

I guess for a gem it is not as useful as for an app. but this ensure the app runs on the ruby it is supposed to.

people running in docker its usually not a problem, but systems with multiple ruby, bundler will complain if the ruby does not have the right version.

I don't have an objection if you prefer removing it.

Copy link
Member

Choose a reason for hiding this comment

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

Indeed, for an app that doesn't have a gemspec it can make sense but for a gem I don't see the point.

Copy link
Collaborator

Choose a reason for hiding this comment

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

in a way, it was adding a guarantee that GHA, indeed, runs the test with the correct ruby version.

I don't remember if this project is one of the first that I moved from multiple Gemfiles to a single. but it might be the reason.

@ekohl ekohl merged commit 03c7a4f into Apipie:master May 12, 2024
24 checks passed
@mathieujobin
Copy link
Collaborator

@ekohl I've been doing squash merge for a few years now, I think we should stick with squash merge on this projct.

@m-nakamura145 m-nakamura145 deleted the bump-ruby-versions-on-test-jobs branch May 30, 2024 00:35
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