From 59c23d5a116ea3cfdcdfa6fa6a5565ce63252dea Mon Sep 17 00:00:00 2001 From: Samir Tapiero Date: Tue, 13 Feb 2024 12:45:55 -0500 Subject: [PATCH] Replace codeclimate report way --- .github/workflows/test.yml | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3f9a8e9..0d4c592 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -26,19 +26,18 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v4 - - name: Setup Code Climate test-reporter - run: | - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter - chmod +x ./cc-test-reporter - ./cc-test-reporter before-build - if: matrix.coverage - name: Bundle install run: bundle install -j$(nproc) --retry 3 - name: Run tests run: bundle exec rspec timeout-minutes: 1 - - name: Publish code coverage - run: | - export GIT_BRANCH="${GITHUB_REF/refs\/heads\//}" - ./cc-test-reporter after-build -r ${{env.CC_TEST_REPORTER_ID}} - if: matrix.coverage + if: !matrix.coverage + - name: Test & publish code coverage + uses: paambaati/codeclimate-action@v3.0.0 + env: + CC_TEST_REPORTER_ID: ${{ env.CC_TEST_REPORTER_ID }} + with: + coverageCommand: bundle exec rspec + coverageLocations: ${{ github.workspace }}/coverage/coverage.json:simplecov + debug: true + if: matrix.coverage