Skip to content

Commit 5dc61b1

Browse files
authored
Merge pull request #125 from madhavc/add-codecov
adds codecov for unit test coverage
2 parents 7a53471 + 9002667 commit 5dc61b1

File tree

4 files changed

+26
-2
lines changed

4 files changed

+26
-2
lines changed

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,11 @@ before_script:
1212
- echo $JAVA_OPTS
1313
- export JAVA_OPTS="$JAVA_OPTS -Xmx1024m"
1414
- export GRADLE_OPTS=-Xmx1024m
15+
after_success:
16+
- bash <(curl -s https://codecov.io/bash) -t $CODECOV_TOKEN
1517

1618
# workaround for https://github.com/travis-ci/travis-ci/issues/5227
1719
addons:
1820
hosts:
1921
- myshorthost
2022
hostname: myshorthost
21-

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# OpenTok Java SDK
22

33
[![Build Status](https://travis-ci.org/opentok/Opentok-Java-SDK.svg?branch=master)](https://travis-ci.org/opentok/Opentok-Java-SDK)
4-
4+
[![codecov](https://codecov.io/gh/opentok/Opentok-Java-SDK/branch/master/graph/badge.svg)](https://codecov.io/gh/opentok/Opentok-Java-SDK)
55
The OpenTok Java SDK lets you generate
66
[sessions](http://tokbox.com/opentok/tutorials/create-session/) and
77
[tokens](http://tokbox.com/opentok/tutorials/create-token/) for [OpenTok](http://www.tokbox.com/)

build.gradle

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ apply plugin: 'signing'
88
apply plugin: 'idea'
99
apply plugin: 'eclipse'
1010
apply plugin: 'license'
11+
apply plugin: 'jacoco'
1112

1213
group = 'com.tokbox'
1314
archivesBaseName = 'opentok-server-sdk'
@@ -27,6 +28,13 @@ javadoc {
2728
}
2829
}
2930

31+
jacocoTestReport {
32+
reports {
33+
xml.enabled true
34+
html.enabled false
35+
}
36+
}
37+
3038
task sourcesJar(type: Jar) {
3139
classifier = 'sources'
3240
from sourceSets.main.allSource

codecov.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Team Yaml
2+
coverage:
3+
round: down
4+
precision: 5
5+
6+
# Repository Yaml
7+
coverage:
8+
round: up
9+
range: 0..10
10+
11+
# Used in Codecov after updating
12+
coverage:
13+
round: up
14+
range: 0..10
15+
precision: 5

0 commit comments

Comments
 (0)