Skip to content

Commit

Permalink
Update test-coverage.yaml action
Browse files Browse the repository at this point in the history
  • Loading branch information
dieghernan authored Nov 28, 2024
1 parent 6dd1a3f commit 9ab816c
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,23 @@ jobs:
covr::to_cobertura(cov)
shell: Rscript {0}

- uses: codecov/codecov-action@v4
- name: Create Junit Report
if: always()
run: |
testthat::test_local(reporter = testthat::JunitReporter$new("./junit.xml"))
shell: Rscript {0}

- name: Upload test results to Codecov
if: ${{ !cancelled() }}
uses: codecov/test-results-action@v1
with:
# Fail if error if not on PR, or if on PR and token is given
fail_ci_if_error: ${{ github.event_name != 'pull_request' || secrets.CODECOV_TOKEN }}
file: ./junit.xml
token: ${{ secrets.CODECOV_TOKEN }}

- name: Upload coverage report
uses: codecov/codecov-action@v4
with:
# Fail if error if not on PR, or if on PR and token is given
fail_ci_if_error: ${{ github.event_name != 'pull_request' || secrets.CODECOV_TOKEN }}
Expand All @@ -59,4 +75,4 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: coverage-test-failures
path: ${{ runner.temp }}/package
path: ${{ runner.temp }}/package

0 comments on commit 9ab816c

Please sign in to comment.