From d5dfd8970618642a21c6e75c49ec09c5c5b119d0 Mon Sep 17 00:00:00 2001 From: Kim Burgestrand Date: Thu, 10 Oct 2024 14:31:49 +0200 Subject: [PATCH] Move coverage into its own action --- .github/workflows/main.yml | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2834d4d3..5a1d0dfe 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -77,17 +77,37 @@ jobs: run: bundle exec rspec env: COVERAGE: 1 - - uses: joshmfrankel/simplecov-check-action@be89e11889202cc59efb14aab2a7091622fa9aad + - name: Upload coverage results + uses: actions/upload-artifact@v4 with: - github_token: ${{ secrets.GITHUB_TOKEN }} - minimum_suite_coverage: 100 - minimum_file_coverage: 100 + include-hidden-files: true + name: coverage-results + path: coverage + retention-days: 1 - name: Upload code coverage to Code Climate run: | ./cc-test-reporter after-build \ --coverage-input-type simplecov \ ./coverage/.resultset.json + coverage-check: + permissions: + checks: write + needs: test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Download coverage results + uses: actions/download-artifact@v4 + with: + name: coverage-results + path: coverage + - uses: joshmfrankel/simplecov-check-action@be89e11889202cc59efb14aab2a7091622fa9aad + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + minimum_suite_coverage: 100 + minimum_file_coverage: 100 + rubocop: runs-on: ubuntu-latest steps: