diff --git a/.github/workflows/test-coverage.yaml b/.github/workflows/test-coverage.yaml index f6aae0f..f443f10 100644 --- a/.github/workflows/test-coverage.yaml +++ b/.github/workflows/test-coverage.yaml @@ -15,7 +15,6 @@ jobs: env: RENV_PROFILE: "full" GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} RENV_CONFIG_SANDBOX_ENABLED: false steps: @@ -39,21 +38,28 @@ jobs: - uses: r-lib/actions/setup-r-dependencies@v2 with: - packages: any::covr + packages: any::covr any::xml2 needs: coverage - - - name: Install clinsight - shell: bash - run: R CMD INSTALL --preclean . - name: Test coverage - run: covr::codecov( - quiet = FALSE, - clean = FALSE, - install_path = file.path(Sys.getenv("RUNNER_TEMP"), "package"), - token = Sys.getenv("CODECOV_TOKEN") - ) + run: | + cov <- covr::package_coverage( + quiet = FALSE, + clean = FALSE, + install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "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() diff --git a/DESCRIPTION b/DESCRIPTION index 975c9e7..744bcd2 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: clinsight Title: ClinSight -Version: 0.1.1.9010 +Version: 0.1.1.9011 Authors@R: c( person("Leonard Daniƫl", "Samson", , "lsamson@gcp-service.com", role = c("cre", "aut"), comment = c(ORCID = "0000-0002-6252-7639")), diff --git a/NEWS.md b/NEWS.md index a22c00b..0dbc70d 100644 --- a/NEWS.md +++ b/NEWS.md @@ -13,6 +13,7 @@ ## Bug fixes +- The test-coverage GHA workflow is updated so that codecov uploads work again. # clinsight 0.1.1 diff --git a/inst/golem-config.yml b/inst/golem-config.yml index 8cbba89..3d15e65 100644 --- a/inst/golem-config.yml +++ b/inst/golem-config.yml @@ -1,6 +1,6 @@ default: golem_name: clinsight - golem_version: 0.1.1.9010 + golem_version: 0.1.1.9011 app_prod: no user_identification: test_user study_data: !expr clinsight::clinsightful_data