diff --git a/.github/workflows/test-coverage.yaml b/.github/workflows/test-coverage.yaml index dffb85e7..ff2b7045 100644 --- a/.github/workflows/test-coverage.yaml +++ b/.github/workflows/test-coverage.yaml @@ -1,4 +1,4 @@ -# Workflow derived from https://github.com/r-lib/actions/tree/master/examples +# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples # Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help on: push: @@ -9,6 +9,8 @@ on: name: test-coverage +permissions: read-all + jobs: test-coverage: runs-on: ubuntu-latest @@ -24,21 +26,45 @@ jobs: sudo apt-get update sudo apt-get install -y texlive-xetex - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - uses: r-lib/actions/setup-pandoc@v2 - uses: r-lib/actions/setup-r@v2 with: - use-public-rspm: true + use-public-rspm: false r-version: 'renv' - uses: r-lib/actions/setup-renv@v2 - - name: Install riskassessment - shell: bash - run: R CMD INSTALL --preclean . - - name: Test coverage - run: covr::codecov() + run: | + cov <- covr::package_coverage( + quiet = FALSE, + clean = FALSE, + install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package") + ) + covr::to_cobertura(cov) shell: Rscript {0} + + - uses: codecov/codecov-action@v4 + with: + fail_ci_if_error: ${{ github.event_name != 'pull_request' && true || false }} + file: ./cobertura.xml + plugin: noop + disable_search: true + token: ${{ secrets.CODECOV_TOKEN }} + + - name: Show testthat output + if: always() + run: | + ## -------------------------------------------------------------------- + find '${{ runner.temp }}/package' -name 'testthat.Rout*' -exec cat '{}' \; || true + shell: bash + + - name: Upload test results + if: failure() + uses: actions/upload-artifact@v4 + with: + name: coverage-test-failures + path: ${{ runner.temp }}/package diff --git a/manifest.json b/manifest.json index 2e41d979..a17b9c10 100644 --- a/manifest.json +++ b/manifest.json @@ -4367,7 +4367,7 @@ "Maintainer": "Kevin Ushey ", "Repository": "RSPM", "Date/Publication": "2024-02-29 01:10:07 UTC", - "Built": "R 4.3.3; ; 2024-07-09 17:38:19 UTC; unix" + "Built": "R 4.3.3; ; 2024-07-10 13:11:46 UTC; unix" } }, "reprex": { @@ -6175,7 +6175,7 @@ "checksum": "d74482ddef0a4941a51c077f5ea60e10" }, ".github/workflows/test-coverage.yaml": { - "checksum": "c0baef024db9ec1299aae4098e904e9c" + "checksum": "a854cdb9e1cfbcbbf5ccffdf4755606b" }, ".github/workflows/write-manifest.yaml": { "checksum": "cdfc1470af653982867daed2b99d5b97"