From 5e132b844dd143eaccd820755eabf89d19189a43 Mon Sep 17 00:00:00 2001 From: bart-v Date: Wed, 2 Oct 2024 15:13:34 +0200 Subject: [PATCH] workflows: another apptemp to fix "No coverage reports found" --- .github/workflows/test-coverage.yaml | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test-coverage.yaml b/.github/workflows/test-coverage.yaml index 6eef124..9cac924 100644 --- a/.github/workflows/test-coverage.yaml +++ b/.github/workflows/test-coverage.yaml @@ -28,23 +28,32 @@ jobs: - name: Test coverage run: | - covr::codecov( + cov <- covr::package_coverage( quiet = FALSE, clean = FALSE, - install_path = file.path(Sys.getenv("RUNNER_TEMP"), "package") + install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package") ) + covr::to_cobertura(cov) shell: Rscript {0} + - uses: codecov/codecov-action@v4.5.0 + 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 + find '${{ runner.temp }}/package' -name 'testthat.Rout*' -exec cat '{}' \; || true shell: bash - - name: Upload coverage reports to Codecov - uses: codecov/codecov-action@v4.5.0 + - name: Upload test results + if: failure() + uses: actions/upload-artifact@v4 with: - token: ${{ secrets.CODECOV_TOKEN }} - slug: ropensci/mregions2 + name: coverage-test-failures path: ${{ runner.temp }}/package