From 82614419c0e56ced86a140aaf6ce5926e4e44533 Mon Sep 17 00:00:00 2001 From: LDSamson Date: Tue, 19 Nov 2024 11:52:16 +0100 Subject: [PATCH 1/4] Update to latest test-coverage. Remove package installation since it is redundant --- .github/workflows/test-coverage.yaml | 29 ++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/.github/workflows/test-coverage.yaml b/.github/workflows/test-coverage.yaml index f6aae0f..9e723e2 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,27 @@ 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") + ) + 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 }} + file: ./cobertura.xml + plugin: noop + disable_search: true + token: ${{ secrets.CODECOV_TOKEN }} - name: Show testthat output if: always() From 0f4a6933a28a427602ea049611c16dae6b173ab7 Mon Sep 17 00:00:00 2001 From: LDSamson Date: Thu, 21 Nov 2024 14:50:10 +0100 Subject: [PATCH 2/4] Fix codecov arguments for codecov-actvion V5 https://github.com/marketplace/actions/codecov#v5-release --- .github/workflows/test-coverage.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-coverage.yaml b/.github/workflows/test-coverage.yaml index 9e723e2..fdaed07 100644 --- a/.github/workflows/test-coverage.yaml +++ b/.github/workflows/test-coverage.yaml @@ -55,8 +55,8 @@ jobs: 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 }} - file: ./cobertura.xml - plugin: noop + files: ./cobertura.xml + plugins: noop disable_search: true token: ${{ secrets.CODECOV_TOKEN }} From c547862207c093c6a637bfa3640ee058b9a658c3 Mon Sep 17 00:00:00 2001 From: LDSamson Date: Thu, 21 Nov 2024 15:07:27 +0100 Subject: [PATCH 3/4] Print codecov results again --- .github/workflows/test-coverage.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test-coverage.yaml b/.github/workflows/test-coverage.yaml index fdaed07..f443f10 100644 --- a/.github/workflows/test-coverage.yaml +++ b/.github/workflows/test-coverage.yaml @@ -48,6 +48,7 @@ jobs: clean = FALSE, install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package") ) + print(cov) covr::to_cobertura(cov) shell: Rscript {0} From 047b459d722548781ab5c19326aa9ffc05131d1e Mon Sep 17 00:00:00 2001 From: LDSamson Date: Thu, 21 Nov 2024 15:55:02 +0100 Subject: [PATCH 4/4] Update version and news --- DESCRIPTION | 2 +- NEWS.md | 1 + inst/golem-config.yml | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index b751b56..a5ffec9 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: clinsight Title: ClinSight -Version: 0.1.0.9009 +Version: 0.1.0.9010 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 80847cd..4b96a24 100644 --- a/NEWS.md +++ b/NEWS.md @@ -12,6 +12,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 9bb6516..5fa2a83 100644 --- a/inst/golem-config.yml +++ b/inst/golem-config.yml @@ -1,6 +1,6 @@ default: golem_name: clinsight - golem_version: 0.1.0.9009 + golem_version: 0.1.0.9010 app_prod: no user_identification: test_user study_data: !expr clinsight::clinsightful_data