Skip to content

Commit 81b951a

Browse files
update: modify rubocop installation in CI workflow and add it as a development dependency
1 parent 1aed587 commit 81b951a

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

.github/workflows/ruby.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,14 @@ jobs:
3333
with:
3434
ruby-version: ${{ matrix.ruby }}
3535
bundler-cache: true
36-
- name: Install rubocop conditionally based on Ruby version
36+
- name: Install rubocop conditionally in Gemfile
3737
run: |
3838
echo "Ruby version: ${{ matrix.ruby }}"
3939
if [[ "${{ matrix.ruby }}" == "3.0.0" ]]; then
40-
echo "Installing rubocop 1.78.0 for Ruby 3.0.0"
41-
gem install rubocop -v 1.78.0
42-
else
43-
echo "Installing latest rubocop"
44-
gem install rubocop
40+
echo "Adding rubocop 1.78.0 to Gemfile"
41+
bundle add rubocop --version 1.78.0 || true
4542
fi
43+
bundle install
4644
- name: Run linting
4745
run: |
4846
bundle exec rubocop

optimizely-sdk.gemspec

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ Gem::Specification.new do |spec|
2525
spec.add_development_dependency 'coveralls_reborn'
2626
spec.add_development_dependency 'rake'
2727
spec.add_development_dependency 'rspec'
28+
spec.add_development_dependency 'rubocop'
2829
spec.add_development_dependency 'webmock'
2930

3031
spec.add_runtime_dependency 'json-schema', '>= 2.6'

0 commit comments

Comments
 (0)