Skip to content

Commit

Permalink
Merge pull request #139 from openpharma/ls_update_codecov
Browse files Browse the repository at this point in the history
Fix codecov uploads
  • Loading branch information
jthompson-arcus authored Nov 21, 2024
2 parents 740a10a + 047b459 commit b2bd9bb
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 14 deletions.
30 changes: 18 additions & 12 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -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", , "[email protected]", role = c("cre", "aut"),
comment = c(ORCID = "0000-0002-6252-7639")),
Expand Down
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

## Bug fixes

- The test-coverage GHA workflow is updated so that codecov uploads work again.

# clinsight 0.1.1

Expand Down
2 changes: 1 addition & 1 deletion inst/golem-config.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit b2bd9bb

Please sign in to comment.