From 48f7883a0988b8c21b940bebbb690bceb9b40629 Mon Sep 17 00:00:00 2001 From: Raoul Wadhwa Date: Fri, 28 Aug 2020 17:44:01 -0400 Subject: [PATCH] added code coverage w/ codecov --- .Rbuildignore | 4 +++- .travis.yml | 2 ++ DESCRIPTION | 3 ++- README.md | 1 + codecov.yml | 14 ++++++++++++++ 5 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 codecov.yml diff --git a/.Rbuildignore b/.Rbuildignore index 34dad6e..fa5415e 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -1,7 +1,9 @@ ^ripserr\.Rproj$ ^\.Rproj\.user$ +^README\.md$ ^LICENSE\.md$ ^\.travis\.yml$ ^appveyor\.yml$ ^data-raw$ -^.*\.png$ \ No newline at end of file +^.*\.png$ +^codecov\.yml$ diff --git a/.travis.yml b/.travis.yml index eba8c65..6c57adc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,3 +2,5 @@ language: R cache: packages +after_success: + - Rscript -e 'covr::codecov()' \ No newline at end of file diff --git a/DESCRIPTION b/DESCRIPTION index 9148ef5..30599b5 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -34,4 +34,5 @@ Imports: stats (>= 4.0) SystemRequirements: C++11 Suggests: - testthat (>= 2.3) + testthat (>= 2.3), + covr diff --git a/README.md b/README.md index 8bbd454..552a1ca 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ [![Travis-CI Build Status](https://travis-ci.org/rrrlw/ripserr.svg?branch=master)](https://travis-ci.org/rrrlw/ripserr) [![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/github/rrrlw/ripserr?branch=master&svg=true)](https://ci.appveyor.com/project/rrrlw/ripserr) +[![Codecov test coverage](https://codecov.io/gh/rrrlw/ripserr/branch/master/graph/badge.svg)](https://codecov.io/gh/rrrlw/ripserr?branch=master) [![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) [![CRAN version](http://www.r-pkg.org/badges/version/ripserr)](https://CRAN.R-project.org/package=ripserr) diff --git a/codecov.yml b/codecov.yml new file mode 100644 index 0000000..04c5585 --- /dev/null +++ b/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