From 2cab2611a3998bccbbfa8fa0872727407c9572f9 Mon Sep 17 00:00:00 2001 From: Marc Siegel Date: Mon, 11 Apr 2022 14:56:27 -0400 Subject: [PATCH] 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. --- .github/workflows/main.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0c0fdb0..1af9026 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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