mirror of
https://github.com/agdamsbo/REDCapCAST.git
synced 2025-04-01 21:52:32 +02:00
updated covr action
This commit is contained in:
parent
7dfbb9b549
commit
319ccfd9dd
30
.github/workflows/test-coverage.yaml
vendored
30
.github/workflows/test-coverage.yaml
vendored
@ -4,9 +4,10 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches: [main, master]
|
branches: [main, master]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [main, master]
|
|
||||||
|
|
||||||
name: test-coverage
|
name: test-coverage.yaml
|
||||||
|
|
||||||
|
permissions: read-all
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test-coverage:
|
test-coverage:
|
||||||
@ -15,38 +16,47 @@ jobs:
|
|||||||
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- uses: r-lib/actions/setup-r@v2
|
- uses: r-lib/actions/setup-r@v2
|
||||||
with:
|
with:
|
||||||
use-public-rspm: true
|
use-public-rspm: true
|
||||||
|
|
||||||
# - uses: r-lib/actions/setup-renv@v2
|
|
||||||
|
|
||||||
- uses: r-lib/actions/setup-r-dependencies@v2
|
- uses: r-lib/actions/setup-r-dependencies@v2
|
||||||
with:
|
with:
|
||||||
extra-packages: any::covr
|
extra-packages: any::covr, any::xml2
|
||||||
needs: coverage
|
needs: coverage
|
||||||
|
|
||||||
- name: Test coverage
|
- name: Test coverage
|
||||||
run: |
|
run: |
|
||||||
covr::codecov(
|
cov <- covr::package_coverage(
|
||||||
quiet = FALSE,
|
quiet = FALSE,
|
||||||
clean = FALSE,
|
clean = FALSE,
|
||||||
install_path = file.path(Sys.getenv("RUNNER_TEMP"), "package")
|
install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package")
|
||||||
)
|
)
|
||||||
|
print(cov)
|
||||||
|
covr::to_cobertura(cov)
|
||||||
shell: Rscript {0}
|
shell: Rscript {0}
|
||||||
|
|
||||||
|
- uses: codecov/codecov-action@v4
|
||||||
|
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
|
- name: Show testthat output
|
||||||
if: always()
|
if: always()
|
||||||
run: |
|
run: |
|
||||||
## --------------------------------------------------------------------
|
## --------------------------------------------------------------------
|
||||||
find ${{ runner.temp }}/package -name 'testthat.Rout*' -exec cat '{}' \; || true
|
find '${{ runner.temp }}/package' -name 'testthat.Rout*' -exec cat '{}' \; || true
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
- name: Upload test results
|
- name: Upload test results
|
||||||
if: failure()
|
if: failure()
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: coverage-test-failures
|
name: coverage-test-failures
|
||||||
path: ${{ runner.temp }}/package
|
path: ${{ runner.temp }}/package
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
<!-- badges: start -->
|
<!-- badges: start -->
|
||||||
|
|
||||||
[](https://github.com/agdamsbo/REDCapCAST) [](https://CRAN.R-project.org/package=REDCapCAST) [](https://doi.org/10.5281/zenodo.8013984) [](https://github.com/agdamsbo/REDCapCAST/actions/workflows/rhub.yaml) [](https://github.com/agdamsbo/REDCapCAST/actions/workflows/R-CMD-check.yaml) [](https://github.com/agdamsbo/REDCapCAST/actions/workflows/pages/pages-build-deployment) [](https://app.codecov.io/gh/agdamsbo/REDCapCAST?branch=master) [](https://cran.r-project.org/package=REDCapCAST) [](https://lifecycle.r-lib.org/articles/stages.html)
|
[](https://github.com/agdamsbo/REDCapCAST) [](https://CRAN.R-project.org/package=REDCapCAST) [](https://doi.org/10.5281/zenodo.8013984) [](https://github.com/agdamsbo/REDCapCAST/actions/workflows/rhub.yaml) [](https://github.com/agdamsbo/REDCapCAST/actions/workflows/R-CMD-check.yaml) [](https://github.com/agdamsbo/REDCapCAST/actions/workflows/pages/pages-build-deployment) [](https://cran.r-project.org/package=REDCapCAST) [](https://lifecycle.r-lib.org/articles/stages.html) [](https://app.codecov.io/gh/agdamsbo/REDCapCAST)
|
||||||
|
|
||||||
<!-- badges: end -->
|
<!-- badges: end -->
|
||||||
|
|
||||||
# REDCapCAST package <img src="man/figures/logo.png" align="right"/>
|
# REDCapCAST package <img src="man/figures/logo.png" align="right"/>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user