Skip to content

Commit a97bb3f

Browse files
committed
Setup codecov
1 parent b20a5a3 commit a97bb3f

File tree

7 files changed

+29
-1
lines changed

7 files changed

+29
-1
lines changed

.Rbuildignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@
66
^_pkgdown\.yml$
77
^docs$
88
^pkgdown$
9+
^codecov\.yml$

.travis.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,13 @@ notifications:
1212

1313
r_packages:
1414
- magrittr
15+
- covr
1516

1617
before_cache: Rscript -e 'remotes::install_cran("pkgdown")'
1718
deploy:
1819
provider: script
1920
script: Rscript -e 'pkgdown::deploy_site_github()'
2021
skip_cleanup: true
22+
23+
after_success:
24+
- Rscript -e 'covr::codecov()'

DESCRIPTION

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ Imports:
2121
Suggests:
2222
knitr,
2323
rmarkdown,
24-
testthat (>= 2.1.0)
24+
testthat (>= 2.1.0),
25+
covr
2526
VignetteBuilder: knitr
2627
URL: https://github.com/ahasverus/pkgmin
2728
BugReports: https://github.com/ahasverus/pkgmin/issues

README.Rmd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ knitr::opts_chunk$set(
1818
<!-- badges: start -->
1919
[![Travis build status](https://travis-ci.org/ahasverus/pkgmin.svg?branch=master)](https://travis-ci.org/ahasverus/pkgmin)
2020
[![AppVeyor build status](https://ci.appveyor.com/api/projects/status/github/ahasverus/pkgmin?branch=master&svg=true)](https://ci.appveyor.com/project/ahasverus/pkgmin)
21+
[![Codecov test coverage](https://codecov.io/gh/ahasverus/pkgmin/branch/master/graph/badge.svg)](https://codecov.io/gh/ahasverus/pkgmin?branch=master)
2122
<!-- badges: end -->
2223

2324
The goal of pkgmin is to show the structure of an R package.

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
status](https://travis-ci.org/ahasverus/pkgmin.svg?branch=master)](https://travis-ci.org/ahasverus/pkgmin)
1010
[![AppVeyor build
1111
status](https://ci.appveyor.com/api/projects/status/github/ahasverus/pkgmin?branch=master&svg=true)](https://ci.appveyor.com/project/ahasverus/pkgmin)
12+
[![Codecov test
13+
coverage](https://codecov.io/gh/ahasverus/pkgmin/branch/master/graph/badge.svg)](https://codecov.io/gh/ahasverus/pkgmin?branch=master)
1214
<!-- badges: end -->
1315

1416
The goal of pkgmin is to show the structure of an R package.

codecov.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
comment: false
2+
3+
coverage:
4+
status:
5+
project:
6+
default:
7+
target: auto
8+
threshold: 1%
9+
patch:
10+
default:
11+
target: auto
12+
threshold: 1%

dev_history.R

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,3 +143,10 @@ system("git push")
143143
system("git add -A")
144144
system("git commit -m 'Edit moyenne tests & Improve function checks'")
145145
system("git push")
146+
147+
usethis::use_coverage("codecov")
148+
## ● Wait a few minutes (after adding repository on https://codecov.io)
149+
rmarkdown::render("README.Rmd")
150+
system("git add -A")
151+
system("git commit -m 'Setup codecov'")
152+
system("git push")

0 commit comments

Comments
 (0)