diff --git a/.github/workflows/test-coverage.yml b/.github/workflows/test-coverage.yml index 1559ea6..cbcffd7 100644 --- a/.github/workflows/test-coverage.yml +++ b/.github/workflows/test-coverage.yml @@ -17,11 +17,11 @@ jobs: steps: - name: Checkout Repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Query dependencies run: | - BiocManager::install(c("remotes", "covr")) + BiocManager::install(c("remotes", "covr", "xml2")) saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2) shell: Rscript {0} @@ -42,34 +42,32 @@ jobs: - name: Check Package env: _R_CHECK_CRAN_INCOMING_REMOTE_: false - run: rcmdcheck::rcmdcheck(args = c("--no-manual"), error_on = "error", check_dir = "check") + run: rcmdcheck::rcmdcheck(args = "--no-manual", error_on = "error", check_dir = "check") shell: Rscript {0} - name: Test coverage run: | - covr::codecov( + 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} - - name: Show testthat output - if: always() - run: | - ## -------------------------------------------------------------------- - find ${{ runner.temp }} -name 'testthat.Rout*' -exec cat '{}' \; || true - shell: bash - - name: Upload test results to Codecov if: ${{ !cancelled() }} - uses: codecov/test-results-action@v1 + 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: Upload artifact on failure if: failure() - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: coverage-test-failures path: ${{ runner.temp }}/package