CI: exclude Gemfile 'checks' group except latest Ruby (#92)

Since we only run Rubocop on the latest MRI Ruby, dont
install the "checks" Gemfile group on other rubies in CI.
This commit is contained in:
Marc Siegel 2022-04-11 14:56:27 -04:00 committed by GitHub
parent ba7684f0bd
commit 2cab2611a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 12 additions and 1 deletions

View File

@ -18,14 +18,25 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3.0.0
# Conditionally configure bundler via environment variables as advised
# * https://github.com/ruby/setup-ruby#bundle-config
- name: Set bundler environment variables
run: |
echo "BUNDLE_WITHOUT=checks" >> $GITHUB_ENV
if: matrix.ruby != 3.1
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- run: bundle exec rspec
- uses: codecov/codecov-action@v3.0.0
with:
name: ${{ matrix.ruby }}
file: ./coverage/coverage.xml
- run: bundle exec rubocop
if: matrix.ruby == '3.0'
if: matrix.ruby == 3.1