diff --git a/.github/workflows/rubocop.yml b/.github/workflows/rubocop.yml index 39b9780..4e51ad2 100644 --- a/.github/workflows/rubocop.yml +++ b/.github/workflows/rubocop.yml @@ -1,10 +1,3 @@ -# This workflow uses actions that are not certified by GitHub. -# They are provided by a third-party and are governed by -# separate terms of service, privacy policy, and support -# documentation. -# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake -# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby - name: RuboCop on: @@ -18,25 +11,21 @@ permissions: contents: read jobs: - test: + analysis: runs-on: ubuntu-latest - # runs-on: macos-latest strategy: matrix: - # ruby-version: ['2.7', '3.0', '3.2'] ruby-version: ['2.7', '3.2'] steps: - uses: actions/checkout@v3 - name: Set up Ruby - # To automatically get bug fixes and new Ruby versions for ruby/setup-ruby, - # change this to (see https://github.com/ruby/setup-ruby#versioning): uses: ruby/setup-ruby@v1 - # uses: ruby/setup-ruby@55283cc23133118229fd3f97f9336ee23a179fcf # v1.146.0 with: ruby-version: ${{ matrix.ruby-version }} bundler-cache: true # runs 'bundle install' and caches installed gems automatically - - run: bundle exec rubocop -V + - name: RuboCop version information + run: bundle exec rubocop -V - name: Run RuboCop - run: bundle exec rubocop --debug + run: bundle exec rubocop diff --git a/Gemfile b/Gemfile index 1a26d6e..ff07259 100644 --- a/Gemfile +++ b/Gemfile @@ -1,14 +1,20 @@ source 'https://rubygems.org' -# group :development do -# gem 'colorize', '~> 0.8.1' -# gem 'minitest', '5.4.3' -# gem 'minitest-reporters-json_reporter' -# gem 'rubyzip', '~> 1.2' -# gem 'sketchup-api-stubs' -# gem 'skippy', '~> 0.5.1.a' -# gem 'solargraph' -# end +# 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 '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'