From 08bb58e30c2321301efbed04ef41b05ccfa3ff40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Inge=20J=C3=B8rgensen?= Date: Mon, 13 Nov 2023 16:17:47 +0100 Subject: [PATCH] Update workflow --- .github/workflows/build.yml | 33 +++++++++------------------------ 1 file changed, 9 insertions(+), 24 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f8a3673..195779c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,6 +1,5 @@ env: - RUBY_VERSION: 2.7 - CC_TEST_REPORTER_ID: 56be13323186b8153f0a26ee08541776d3dc3091ef3a64aa3d663f77f8b0e095 + RUBY_VERSION: 3.0 name: Build on: @@ -15,9 +14,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 - - uses: actions/setup-ruby@v1 + - uses: ruby/setup-ruby@v1 with: ruby-version: ${{ env.RUBY_VERSION }} + bundler-cache: true - name: Install Rubocop run: gem install rubocop rubocop-rails rubocop-rspec - name: Check code @@ -26,29 +26,14 @@ jobs: rspec-test: name: RSpec runs-on: ubuntu-latest + strategy: + matrix: + ruby: ['3.0', '3.1', '3.2'] steps: - uses: actions/checkout@v1 - - uses: actions/setup-ruby@v1 + - uses: ruby/setup-ruby@v1 with: - ruby-version: ${{ env.RUBY_VERSION }} - - name: Ruby gem cache - uses: actions/cache@v1 - with: - path: vendor/bundle - key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }} - restore-keys: | - ${{ runner.os }}-gems- - - name: Install Ruby gems - run: | - gem install bundler - bundle config path vendor/bundle - bundle install + ruby-version: ${{ matrix.ruby }} + bundler-cache: true - name: Run tests run: bundle exec rspec - - name: Send results to Code Climate - uses: paambaati/codeclimate-action@v2.6.0 - if: ${{ env.CC_TEST_REPORTER_ID }} - env: - CC_TEST_REPORTER_ID: ${{ env.CC_TEST_REPORTER_ID }} - with: - coverageCommand: ls