Skip to content

Commit

Permalink
add codecov
Browse files Browse the repository at this point in the history
  • Loading branch information
tanho63 committed Jan 16, 2022
1 parent 0b3bdc6 commit 48c0b23
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 1 deletion.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@
^update$
^modelling$
^models$
^codecov\.yml$
30 changes: 30 additions & 0 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Workflow derived from https://github.com/r-lib/actions/tree/master/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]

name: test-coverage

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

steps:
- uses: actions/checkout@v2

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

- uses: r-lib/actions/setup-r-dependencies@v1
with:
extra-packages: covr

- name: Test coverage
run: covr::codecov()
shell: Rscript {0}
3 changes: 2 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ Suggests:
roxygen2 (>= 7.1.0),
testthat (>= 3.0.0),
piggyback (>= 0.1.1),
arrow (>= 5.0.0)
arrow (>= 5.0.0),
covr
Config/testthat/edition: 3
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
Expand Down
1 change: 1 addition & 0 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ options(tibble.max_extra_cols = 20,
experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg?style=flat-square)](https://lifecycle.r-lib.org/articles/stages.html#experimental)
[![Dev
status](https://img.shields.io/github/r-package/v/ffverse/ffopportunity/main?label=dev&style=flat-square&logo=github)](https://ffopportunity.ffverse.com/)
[![Codecov test coverage](https://img.shields.io/codecov/c/github/ffverse/ffopportunity?label=codecov&style=flat-square&logo=codecov)](https://app.codecov.io/gh/ffverse/ffopportunity?branch=main)
[![nflverse discord](https://img.shields.io/discord/789805604076126219?color=7289da&label=nflverse%20discord&logo=discord&logoColor=fff&style=flat-square)](https://discord.com/invite/5Er2FBnnQa)
<!-- badges: end -->

Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ status](https://img.shields.io/cran/v/ffopportunity?style=flat-square&logo=R&lab
experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg?style=flat-square)](https://lifecycle.r-lib.org/articles/stages.html#experimental)
[![Dev
status](https://img.shields.io/github/r-package/v/ffverse/ffopportunity/main?label=dev&style=flat-square&logo=github)](https://ffopportunity.ffverse.com/)
[![Codecov test
coverage](https://img.shields.io/codecov/c/github/ffverse/ffopportunity?label=codecov&style=flat-square&logo=codecov)](https://app.codecov.io/gh/ffverse/ffopportunity?branch=main)
[![nflverse
discord](https://img.shields.io/discord/789805604076126219?color=7289da&label=nflverse%20discord&logo=discord&logoColor=fff&style=flat-square)](https://discord.com/invite/5Er2FBnnQa)
<!-- badges: end -->
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 48c0b23

Please sign in to comment.