Skip to content

Commit

Permalink
Attempt voodoo to resurrect codecov
Browse files Browse the repository at this point in the history
  • Loading branch information
teunbrand committed Oct 8, 2024
1 parent 8812c62 commit 4748795
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 5 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@
^docs$
^pkgdown$
^vignettes/articles$
^codecov\.yml$
17 changes: 14 additions & 3 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ on:
pull_request:
branches: [main, master]

name: test-coverage
name: test-coverage.yaml

permissions: read-all

jobs:
test-coverage:
Expand All @@ -23,18 +25,27 @@ jobs:

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

- name: Test coverage
run: |
covr::codecov(
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: |
Expand Down
2 changes: 1 addition & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ knitr::opts_chunk$set(
[![R-CMD-check](https://github.com/teunbrand/legendry/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/teunbrand/legendry/actions/workflows/R-CMD-check.yaml)
[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)
[![CRAN status](https://www.r-pkg.org/badges/version/legendry)](https://CRAN.R-project.org/package=legendry)
[![codecov](https://codecov.io/gh/teunbrand/legendry/graph/badge.svg)](https://codecov.io/gh/teunbrand/legendry)
[![Codecov test coverage](https://codecov.io/gh/teunbrand/legendry/graph/badge.svg)](https://app.codecov.io/gh/teunbrand/legendry)
<!-- badges: end -->

The goal of legendry is to provide additional guide functionality to the ggplot2 ecosystem.
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)
[![CRAN
status](https://www.r-pkg.org/badges/version/legendry)](https://CRAN.R-project.org/package=legendry)
[![codecov](https://codecov.io/gh/teunbrand/legendry/graph/badge.svg)](https://codecov.io/gh/teunbrand/legendry)
[![Codecov test
coverage](https://codecov.io/gh/teunbrand/legendry/graph/badge.svg)](https://app.codecov.io/gh/teunbrand/legendry)
<!-- badges: end -->

The goal of legendry is to provide additional guide functionality to the
Expand Down
14 changes: 14 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
comment: false

coverage:
status:
project:
default:
target: auto
threshold: 1%
informational: true
patch:
default:
target: auto
threshold: 1%
informational: true

0 comments on commit 4748795

Please sign in to comment.