Skip to content

Commit

Permalink
Try to fix code coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
karissawhiting committed May 23, 2024
1 parent 28e11b3 commit 0354873
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 8 deletions.
39 changes: 35 additions & 4 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Workflow derived from https://github.com/r-lib/actions/tree/master/examples
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
Expand All @@ -8,23 +8,54 @@ on:

name: test-coverage

permissions: read-all

jobs:
test-coverage:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: covr
extra-packages: any::covr, any::xml2
needs: coverage

- name: Test coverage
run: covr::codecov()
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@v4
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
shell: bash

- name: Upload test results
if: failure()
uses: actions/upload-artifact@v4
with:
name: coverage-test-failures
path: ${{ runner.temp }}/package
17 changes: 16 additions & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ knitr::opts_chunk$set(
# bstfun

<!-- badges: start -->
[![R-CMD-check](https://github.com/MSKCC-Epi-Bio/bstfun/workflows/R-CMD-check/badge.svg)](https://github.com/MSKCC-Epi-Bio/bstfun/actions)
[![Codecov test coverage](https://codecov.io/gh/MSKCC-Epi-Bio/bstfun/branch/main/graph/badge.svg)](https://app.codecov.io/gh/MSKCC-Epi-Bio/bstfun?branch=main)
[![R-CMD-check](https://github.com/MSKCC-Epi-Bio/bstfun/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/MSKCC-Epi-Bio/bstfun/actions/workflows/R-CMD-check.yaml)
[![test-coverage](https://github.com/MSKCC-Epi-Bio/bstfun/actions/workflows/test-coverage.yaml/badge.svg)](https://github.com/MSKCC-Epi-Bio/bstfun/actions/workflows/test-coverage.yaml)
<!-- badges: end -->

A miscellaneous collection of functions to used by members of the Biostatistics Department at MSKCC. Functions in the {bstfun} package do not fall within the well-defined packages with more narrow scope used by the department.
Expand All @@ -33,3 +33,18 @@ You can install the development version of {bstfun} with:
``` r
devtools::install_github("MSKCC-Epi-Bio/bstfun")
```


## Contributing

Thank you to all contributors, including:

[&#x0040;ddsjoberg](https://github.com/ddsjoberg)
[&#x0040;karissawhiting](https://github.com/karissawhiting)
[&#x0040;stl2137](https://github.com/stl2137),
[&#x0040;vertosie](https://github.com/vertosie),
[&#x0040;jalavery](https://github.com/jalavery),
[&#x0040;larmarange](https://github.com/larmarange),
[&#x0040;slobaugh](https://github.com/slobaugh),
[&#x0040;leejasme](https://github.com/leejasme)

19 changes: 16 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@

<!-- badges: start -->

[![R-CMD-check](https://github.com/MSKCC-Epi-Bio/bstfun/workflows/R-CMD-check/badge.svg)](https://github.com/MSKCC-Epi-Bio/bstfun/actions)
[![Codecov test
coverage](https://codecov.io/gh/MSKCC-Epi-Bio/bstfun/branch/master/graph/badge.svg)](https://app.codecov.io/gh/MSKCC-Epi-Bio/bstfun?branch=main)
coverage](https://codecov.io/gh/MSKCC-Epi-Bio/bstfun/branch/main/graph/badge.svg)](https://app.codecov.io/gh/MSKCC-Epi-Bio/bstfun?branch=main)
[![R-CMD-check](https://github.com/MSKCC-Epi-Bio/bstfun/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/MSKCC-Epi-Bio/bstfun/actions/workflows/R-CMD-check.yaml)
[![test-coverage](https://github.com/MSKCC-Epi-Bio/bstfun/actions/workflows/test-coverage.yaml/badge.svg)](https://github.com/MSKCC-Epi-Bio/bstfun/actions/workflows/test-coverage.yaml)
<!-- badges: end -->

A miscellaneous collection of functions to used by members of the
Expand All @@ -26,4 +27,16 @@ You can install the development version of {bstfun} with:
``` r
devtools::install_github("MSKCC-Epi-Bio/bstfun")
```


## Contributing

Thank you to all contributors, including:

[@ddsjoberg](https://github.com/ddsjoberg)
[@karissawhiting](https://github.com/karissawhiting)
[@stl2137](https://github.com/stl2137),
[@vertosie](https://github.com/vertosie),
[@jalavery](https://github.com/jalavery),
[@larmarange](https://github.com/larmarange),
[@slobaugh](https://github.com/slobaugh),
[@leejasme](https://github.com/leejasme)

0 comments on commit 0354873

Please sign in to comment.