Skip to content

Commit

Permalink
Install RuboCop only on Ruby 2.6+
Browse files Browse the repository at this point in the history
Run RuboCop on Ruby 2.6
  • Loading branch information
mishina2228 committed May 30, 2022
1 parent 989cc25 commit d238d7f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ jobs:
BUNDLE_WITHOUT: development
steps:
- uses: actions/checkout@v3
- name: Set up Ruby 2.4
- name: Set up Ruby 2.6
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.4
ruby-version: 2.6
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Run RuboCop
run: bundle exec rubocop
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ group :test do
# Downgrade psych because old RuboCop can't use new Psych
gem 'psych', '< 4.0.0'
# https://github.com/bbatsov/rubocop/pull/4789
gem 'rubocop', '~> 1.30'
gem 'rubocop', '~> 1.30' if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('2.6')
end

group :benchmarks, optional: true do
Expand Down

0 comments on commit d238d7f

Please sign in to comment.