Skip to content

Commit

Permalink
update GHA and add codecov
Browse files Browse the repository at this point in the history
  • Loading branch information
cderv committed Mar 7, 2022
1 parent f27bed2 commit 1fdd73c
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 8 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Expand Up @@ -6,3 +6,4 @@
^revdep$
^CRAN-SUBMISSION$
^README\.Rmd$
^codecov\.yml$
17 changes: 13 additions & 4 deletions .github/workflows/R-CMD-check.yaml
@@ -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
#
# NOTE: This workflow is overkill for most R packages and
Expand All @@ -22,10 +22,10 @@ jobs:
fail-fast: false
matrix:
config:
- {os: macOS-latest, r: 'release', pandoc: '2.17.0.1'}
- {os: windows-latest, r: 'release', pandoc: '2.17.0.1'}
- {os: macOS-latest, r: 'release', pandoc: '2.17.1.1'}
- {os: windows-latest, r: 'release', pandoc: '2.17.1.1'}
- {os: ubuntu-18.04, r: 'release', pandoc: 'devel'}
- {os: ubuntu-18.04, r: 'release', pandoc: '2.17.0.1'}
- {os: ubuntu-18.04, r: 'release', pandoc: '2.17.1.1'}
- {os: ubuntu-18.04, r: 'release', pandoc: '2.14.2'}
- {os: ubuntu-18.04, r: 'release', pandoc: '2.11.4'}
- {os: ubuntu-18.04, r: 'release', pandoc: '2.7.3'}
Expand Down Expand Up @@ -59,3 +59,12 @@ jobs:
needs: check

- uses: r-lib/actions/check-r-package@v2
with:
upload-snapshots: true

- name: Test coverage
if: success() && runner.os == 'Linux' && matrix.config.r == 'release' && matrix.config.pandoc == '2.7.3'
run: |
pak::pkg_install('covr')
covr::codecov()
shell: Rscript {0}
1 change: 1 addition & 0 deletions DESCRIPTION
Expand Up @@ -21,6 +21,7 @@ Imports:
rmarkdown (>= 2.11),
xfun (>= 0.13)
Suggests:
covr,
testthat (>= 3.1.0),
withr (>= 2.3.0)
Config/testthat/edition: 3
Expand Down
6 changes: 4 additions & 2 deletions README.Rmd
Expand Up @@ -17,8 +17,10 @@ knitr::opts_chunk$set(

<!-- badges: start -->

[![CRAN status](https://www.r-pkg.org/badges/version/tufte)](https://CRAN.R-project.org/package=tufte) [![R-CMD-check](https://github.com/rstudio/tufte/workflows/R-CMD-check/badge.svg)](https://github.com/rstudio/tufte/actions) [![Downloads from the RStudio CRAN mirror](https://cranlogs.r-pkg.org/badges/tufte)](https://cran.r-project.org/package=tufte)

[![CRAN status](https://www.r-pkg.org/badges/version/tufte)](https://CRAN.R-project.org/package=tufte)
[![Downloads from the RStudio CRAN mirror](https://cranlogs.r-pkg.org/badges/tufte)](https://cran.r-project.org/package=tufte)
[![R-CMD-check](https://github.com/rstudio/tufte/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/rstudio/tufte/actions/workflows/R-CMD-check.yaml)
[![Codecov test coverage](https://codecov.io/gh/rstudio/tufte/branch/main/graph/badge.svg)](https://app.codecov.io/gh/rstudio/tufte?branch=main)
<!-- badges: end -->

This R package provides a few R Markdown output formats that use the Tufte style. See <https://rstudio.github.io/tufte/> for a comprehensive example.
Expand Down
5 changes: 3 additions & 2 deletions README.md
Expand Up @@ -7,10 +7,11 @@

[![CRAN
status](https://www.r-pkg.org/badges/version/tufte)](https://CRAN.R-project.org/package=tufte)
[![R-CMD-check](https://github.com/rstudio/tufte/workflows/R-CMD-check/badge.svg)](https://github.com/rstudio/tufte/actions)
[![Downloads from the RStudio CRAN
mirror](https://cranlogs.r-pkg.org/badges/tufte)](https://cran.r-project.org/package=tufte)

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

This R package provides a few R Markdown output formats that use the
Expand Down
14 changes: 14 additions & 0 deletions codecov.yml
@@ -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 1fdd73c

Please sign in to comment.