Skip to content

Commit

Permalink
Decouple coverage report generation from upload to codecov in CI
Browse files Browse the repository at this point in the history
This allows us to rerun only the upload if it fails because of rate limiting.

Signed-off-by: Maximilian Löffler <s8maloef@stud.uni-saarland.de>
  • Loading branch information
MaLoefUDS committed May 17, 2024
1 parent e809352 commit 32d0482
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,30 @@ jobs:
run: Rscript coverage.R
if: matrix.r-version == 'latest' && steps.run_tests.outcome == 'success'

- name: Store coverage report
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: cobertura.xml
if: matrix.r-version == 'latest' && steps.gen_coverage.outcome == 'success'

upload-coverage-report:
name: Upload coverage report
needs: build
runs-on: ubuntu-latest

steps:
- name: Load coverage report
uses: actions/download-artifact@v4
with:
name: coverage-report

- name: Upload Report to CodeCov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./cobertura.xml
file: cobertura.xml
disable_search: true
fail_ci_if_error: true
verbose: true
if: matrix.r-version == 'latest' && steps.gen_coverage.outcome == 'success'


0 comments on commit 32d0482

Please sign in to comment.