Skip to content

Commit 1153508

Browse files
Revise upload commands
1 parent 75a1c3e commit 1153508

File tree

1 file changed

+20
-5
lines changed

1 file changed

+20
-5
lines changed

.github/workflows/test-coverage.yaml

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,25 @@ jobs:
3838
covr::to_cobertura(cov)
3939
shell: Rscript {0}
4040

41-
# Optional: Upload coverage artifact for GitHub inspection
42-
- name: Save coverage artifacts
41+
- uses: codecov/codecov-action@v5
42+
with:
43+
# Fail if error if not on PR, or if on PR and token is given
44+
fail_ci_if_error: ${{ github.event_name != 'pull_request' || secrets.CODECOV_TOKEN }}
45+
files: ./cobertura.xml
46+
plugins: noop
47+
disable_search: true
48+
token: ${{ secrets.CODECOV_TOKEN }}
49+
50+
- name: Show testthat output
51+
if: always()
52+
run: |
53+
## --------------------------------------------------------------------
54+
find '${{ runner.temp }}/package' -name 'testthat.Rout*' -exec cat '{}' \; || true
55+
shell: bash
56+
57+
- name: Upload test results
58+
if: failure()
4359
uses: actions/upload-artifact@v4
4460
with:
45-
name: coverage
46-
path: coverage*.json
47-
if-no-files-found: ignore
61+
name: coverage-test-failures
62+
path: ${{ runner.temp }}/package

0 commit comments

Comments
 (0)