-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add GitHub Action for RuboCop. (#218)
- Loading branch information
Showing
4 changed files
with
54 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: RuboCop | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: [ "main", "dev/ci", "dev/ci-rubocop" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
analysis: | ||
|
||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
ruby-version: ['2.7', '3.2'] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: ${{ matrix.ruby-version }} | ||
bundler-cache: true # runs 'bundle install' and caches installed gems automatically | ||
- name: RuboCop version information | ||
run: bundle exec rubocop -V | ||
- name: Run RuboCop | ||
run: bundle exec rubocop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,7 @@ | |
/archive/ | ||
/build/ | ||
/tests_old/ | ||
/vendor/ | ||
Debug*/ | ||
Release*/ | ||
ipch/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,23 @@ | ||
source 'https://rubygems.org' | ||
|
||
# Even if you configure Bundler to install only one group it will fail if any | ||
# of the unused groups have dependencies that cannot be resolved. | ||
# On Ruby 3.2 the Minitest 5.4.3 will fail, so applying this kludge to work | ||
# around that until Minitest is updated. | ||
CI_BUILD = ENV['CI'] | ||
|
||
group :development do | ||
gem 'colorize', '~> 0.8.1' | ||
gem 'minitest', '5.4.3' | ||
gem 'minitest-reporters-json_reporter' | ||
gem 'rubocop', '>= 0.82', '< 2.0' | ||
gem 'rubocop-sketchup', '~> 1.3.0' | ||
gem 'rubocop-performance', '~> 1.15.0' | ||
gem 'rubyzip', '~> 1.2' | ||
gem 'sketchup-api-stubs' | ||
gem 'skippy', '~> 0.5.1.a' | ||
gem 'solargraph' | ||
end unless CI_BUILD | ||
|
||
group :analytics do | ||
gem 'rubocop', '>= 0.82', '< 2.0' | ||
gem 'rubocop-sketchup', '~> 1.3.0' | ||
gem 'rubocop-performance', '~> 1.15.0' | ||
end |