Skip to content

Commit d238d7f

Browse files
committed
Install RuboCop only on Ruby 2.6+
Run RuboCop on Ruby 2.6
1 parent 989cc25 commit d238d7f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

.github/workflows/rubocop.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ jobs:
99
BUNDLE_WITHOUT: development
1010
steps:
1111
- uses: actions/checkout@v3
12-
- name: Set up Ruby 2.4
12+
- name: Set up Ruby 2.6
1313
uses: ruby/setup-ruby@v1
1414
with:
15-
ruby-version: 2.4
15+
ruby-version: 2.6
1616
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
1717
- name: Run RuboCop
1818
run: bundle exec rubocop

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ group :test do
1919
# Downgrade psych because old RuboCop can't use new Psych
2020
gem 'psych', '< 4.0.0'
2121
# https://github.com/bbatsov/rubocop/pull/4789
22-
gem 'rubocop', '~> 1.30'
22+
gem 'rubocop', '~> 1.30' if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('2.6')
2323
end
2424

2525
group :benchmarks, optional: true do

0 commit comments

Comments
 (0)