Skip to content

Commit 2e5146c

Browse files
committed
Merge pull request #937 from jimhester/covr
Automatic test coverage reports with coveralls.
2 parents b2fd49d + c40fe18 commit 2e5146c

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

.travis.yml

+4
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ install:
2828
- sudo apt-get install -qq pandoc pandoc-citeproc texlive-latex-recommended > /dev/null
2929
- "wget -q -O - http://yihui.name/xran/r-config | bash"
3030
- Rscript -e 'devtools::install_deps(dep = TRUE)'
31+
- Rscript -e 'devtools::install_github("jimhester/covr")'
3132

3233
# run tests
3334
script:
@@ -37,3 +38,6 @@ script:
3738
after_success:
3839
- export R_PKG="$(basename $TRAVIS_REPO_SLUG)"
3940
- "[ $TARGET = integration ] && (wget -q -O - http://yihui.name/xran/r-xran | bash)"
41+
42+
# run test coverage only for the travis build
43+
- "[ $TARGET = travis ] && Rscript -e 'library(covr);coveralls()'"

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# knitr
22

33
[![Build Status](https://travis-ci.org/yihui/knitr.svg)](https://travis-ci.org/yihui/knitr)
4+
[![Coverage Status](https://img.shields.io/coveralls/yihui/knitr.svg)](https://coveralls.io/r/yihui/knitr?branch=master)
45

56
The R package **knitr** is a general-purpose literate programming engine,
67
with lightweight API's designed to give users full control of the output

0 commit comments

Comments
 (0)