local-ch / lhc

🚀 Advanced HTTP Client for Ruby. Fueled with interceptors.
GNU General Public License v3.0
43 stars 1 forks source link

Simplify GitHub Actions #195

Closed marcoroth closed 3 years ago

marcoroth commented 3 years ago

Hey there 👋🏼

This PR simplifies the GitHub Actions used in lhc. The same can probably be applied to lhs if you like.

The ruby/setup-ruby GitHub Action is way more superior than actions/setup-ruby.

It has built-in bundler cache, supports way more Ruby versions and uses the Ruby version defined in .ruby-version plus makes the actions a lot simpler 😊

marcoroth commented 3 years ago

Huh!

Looks like the rubocop.yml inheritance is not working as it should, at least in GitHub Actions with the ruby/setup-ruby action. I wonder why this just occurs now.

Unable to find gem rubocop-discourse; is the gem installed? Gem::MissingSpecError
/home/runner/work/lhc/lhc/vendor/bundle/ruby/2.7.0/gems/rubocop-0.57.2/lib/rubocop/config_loader_resolver.rb:191:in `rescue in gem_config_path'
/home/runner/work/lhc/lhc/vendor/bundle/ruby/2.7.0/gems/rubocop-0.57.2/lib/rubocop/config_loader_resolver.rb:187:in `gem_config_path'
/home/runner/work/lhc/lhc/vendor/bundle/ruby/2.7.0/gems/rubocop-0.57.2/lib/rubocop/config_loader_resolver.rb:47:in `block (2 levels) in resolve_inheritance_from_gems'
...

Funny enough, you do not require rubocop-discourse itself. Looking at the stacktrace it looks like some sub-dependency is probably using it (resolve_inheritance_from_gems).

I found this rubocop issue which seems to be somewhat related: https://github.com/rubocop/rubocop/issues/5000.

But given you are running Rubocop 0.57.2 it's probably fixed in a more recent version.

ryabrody commented 3 years ago

@marcoroth thx for your PR. We upgraded rubocop in another PR and also included your commit there: https://github.com/local-ch/lhc/pull/197.