diff --git a/.github/workflows/test-coverage.yaml b/.github/workflows/test-coverage.yaml index 9e73f27..45b083f 100644 --- a/.github/workflows/test-coverage.yaml +++ b/.github/workflows/test-coverage.yaml @@ -15,6 +15,7 @@ jobs: runs-on: ubuntu-latest env: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} steps: - uses: actions/checkout@v5 @@ -25,30 +26,18 @@ jobs: - uses: r-lib/actions/setup-r-dependencies@v2 with: - extra-packages: any::covr, any::xml2 + extra-packages: any::covr needs: coverage - cache-version: 2 - name: Test coverage run: | - cov <- covr::package_coverage( + covr::codecov( quiet = FALSE, clean = FALSE, - install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package") + install_path = file.path(Sys.getenv("RUNNER_TEMP"), "package") ) - print(cov) - covr::to_cobertura(cov) shell: Rscript {0} - - uses: codecov/codecov-action@v5 - 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 }} - files: ./cobertura.xml - plugins: noop - disable_search: true - token: ${{ secrets.CODECOV_TOKEN }} - - name: Show testthat output if: always() run: | diff --git a/tests/testthat.R b/tests/testthat.R new file mode 100644 index 0000000..6ddb830 --- /dev/null +++ b/tests/testthat.R @@ -0,0 +1,12 @@ +# This file is part of the standard setup for testthat. +# It is recommended that you do not modify it. +# +# Where should you do additional test configuration? +# Learn more about the roles of various files in: +# * https://r-pkgs.org/testing-design.html#sec-tests-files-overview +# * https://testthat.r-lib.org/articles/special-files.html + +library(testthat) +library(tempdisagg) + +test_check("tempdisagg")