Skip to content

Commit 5f24f96

Browse files
committed
added code coverage check to travis
1 parent f5f5d86 commit 5f24f96

File tree

6 files changed

+29
-12
lines changed

6 files changed

+29
-12
lines changed

.Rbuildignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
^codecov\.yml$
12
^.*\.Rproj$
23
^\.Rproj\.user$
34
^LICENSE\.md$

.travis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,5 @@
33
language: R
44
sudo: false
55
cache: packages
6+
after_success:
7+
- Rscript -e 'covr::codecov()'

DESCRIPTION

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ Suggests:
1717
knitr,
1818
lubridate,
1919
rmarkdown,
20-
testthat
20+
testthat,
21+
covr
2122
VignetteBuilder: knitr
2223
Encoding: UTF-8
2324
LazyData: true

README.Rmd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ knitr::opts_chunk$set(
1717
[![CRAN status](https://www.r-pkg.org/badges/version/dint)](https://cran.r-project.org/package=dint)
1818
[![lifecycle](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://www.tidyverse.org/lifecycle/#stable)
1919
[![Travis build status](https://travis-ci.org/s-fleck/dint.svg?branch=master)](https://travis-ci.org/s-fleck/dint)
20+
[![Coverage status](https://codecov.io/gh/s-fleck/dint/branch/master/graph/badge.svg)](https://codecov.io/github/s-fleck/dint?branch=master)
2021

2122
A Toolkit for Year-Quarter, Year-Month and Year-Isoweek Dates
2223

README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
dint
44
====
55

6-
[![CRAN status](https://www.r-pkg.org/badges/version/dint)](https://cran.r-project.org/package=dint) [![lifecycle](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://www.tidyverse.org/lifecycle/#stable) [![Travis build status](https://travis-ci.org/s-fleck/dint.svg?branch=master)](https://travis-ci.org/s-fleck/dint)
6+
[![CRAN status](https://www.r-pkg.org/badges/version/dint)](https://cran.r-project.org/package=dint) [![lifecycle](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://www.tidyverse.org/lifecycle/#stable) [![Travis build status](https://travis-ci.org/s-fleck/dint.svg?branch=master)](https://travis-ci.org/s-fleck/dint) [![Coverage status](https://codecov.io/gh/s-fleck/dint/branch/master/graph/badge.svg)](https://codecov.io/github/s-fleck/dint?branch=master)
77

8-
A Toolkit for Year-Quarter and Year-Month Dates
8+
A Toolkit for Year-Quarter, Year-Month and Year-Isoweek Dates
99

1010
S3 classes and methods to create and work with year-quarter and year-month vectors. Basic arithmetic operations (such as adding and subtracting) are supported, as well as formatting and converting to and from standard R Date types.
1111

@@ -38,29 +38,29 @@ w <- as_date_yw(as.Date("2017-01-01"))
3838

3939
# printing
4040
print(q)
41-
#> 2014-Q4
41+
#> [1] "2014-Q4"
4242
print(m)
43-
#> 2014-M12
43+
#> [1] "2014-M12"
4444
print(w) # isoweeks do not follow calender years!
45-
#> 2016-W52
45+
#> [1] "2016-W52"
4646

4747
# arithmetic operations
4848
# quarters
4949
q
50-
#> 2014-Q4
50+
#> [1] "2014-Q4"
5151
q + 1
52-
#> 2015-Q1
52+
#> [1] "2015-Q1"
5353
seq(q -2, q + 2)
54-
#> 2014-Q2 2014-Q3 2014-Q4 2015-Q1 2015-Q2
54+
#> [1] "2014-Q2" "2014-Q3" "2014-Q4" "2015-Q1" "2015-Q2"
5555

5656

5757
# months
5858
m
59-
#> 2014-M12
59+
#> [1] "2014-M12"
6060
m + 1
61-
#> 2015-M01
61+
#> [1] "2015-M01"
6262
seq(m -2, m + 2)
63-
#> 2014-M10 2014-M11 2014-M12 2015-M01 2015-M02
63+
#> [1] "2014-M10" "2014-M11" "2014-M12" "2015-M01" "2015-M02"
6464

6565

6666
# formatting

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%

0 commit comments

Comments
 (0)