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

Upgrade Ruby version to 3.2.2 #20

Merged
merged 2 commits into from
Apr 9, 2024

Conversation

BWherryImpero
Copy link
Contributor

We're getting errors using this action as the installed version of Ruby is 2.6 and current versions of standard (via the Rubocop dependency) require a Ruby version of 2.7+.

This PR updates the version of Ruby to 3.2.2

@BWherryImpero BWherryImpero changed the title Upgrade Ruby version to 3.18 Upgrade Ruby version to 3.2.2 Jun 5, 2023
Copy link

@madhums madhums left a comment

Choose a reason for hiding this comment

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

Perhaps there should be a way to specify the ruby version from the workflow file so that it can pick the version used in the project (from .ruby-version file instead of hard-coding like this)

@BWherryImpero
Copy link
Contributor Author

Perhaps there should be a way to specify the ruby version from the workflow file so that it can the version used in the project (from .ruby-version file instead of hardcoding like this)

Good shout. In this instance, it would need to be a build argument.

@madhums
Copy link

madhums commented Jun 20, 2023

And it does not seem to have support https://github.com/orgs/community/discussions/25241 There are some workarounds for it though.

@edwinv
Copy link

edwinv commented Aug 29, 2023

This issue makes this Github action completely unusable now. The latest versions of StandardRB require a later Ruby version. I'm wondering if the Ruby version pinning is required. Why not always use the latest version to also be compatible with the latest versions of StandardRB? This prevents the need for build arguments.

@Samuelodan
Copy link

I wanted to try out the action today, and I ran into this issue. Now, Bundler needs at least Ruby 3.0 to install.
Shouldn't this be an easy merge? I wonder what's up.

Copy link

@madhums madhums left a comment

Choose a reason for hiding this comment

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

Can we use custom build argument as suggested here? https://github.com/orgs/community/discussions/25241#discussioncomment-3247045

That way we end up using the ruby-version of the project. Note that not everyone uses the same version of ruby.

@kmcphillips
Copy link

@andrewmcodes would it be possible to merge this?

@kmcphillips
Copy link

For anyone finding this, the workaround is to use @BWherryImpero 's branch:

      - name: StandardRB Linter
        # uses: andrewmcodes/standardrb-action@v1.0.0 # This is mainline
        uses: BWherryImpero/standardrb-action@upgrade-ruby-version
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

@Samuelodan
Copy link

Hallelujah! It's been merged! I was gonna fork it and change the one line for the mean time. Didn't realize someone already did.

Thanks, Andrew ❤️

@andrewmcodes
Copy link
Owner

@kmcphillips you should be able to use v2.0.0 now.

@Samuelodan no problem!

Please do consider just saving on your execution time by replacing this action with the following:

  standardrb:
    name: StandardRB
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: ruby/setup-ruby@v1
        with:
          bundler-cache: true
      - run: bundle exec standardrb --format github --parallel

Which will create the annotations for you just like this action does but without the extra overhead.

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.

7 participants