Skip to content

Commit c566054

Browse files
authored
2.x: Publish code coverage results to codecov.io (#4048)
1 parent 95febf4 commit c566054

File tree

3 files changed

+19
-0
lines changed

3 files changed

+19
-0
lines changed

.travis.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ sudo: false
1414
# script for build and release via Travis to Bintray
1515
script: gradle/buildViaTravis.sh
1616

17+
# Code coverage
18+
after_success:
19+
- bash <(curl -s https://codecov.io/bash)
20+
1721
# cache between builds
1822
cache:
1923
directories:

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ Learn more about RxJava on the <a href="https://github.com/ReactiveX/RxJava/wiki
5151
## Master Build Status
5252

5353
<a href='https://travis-ci.org/ReactiveX/RxJava/builds'><img src='https://travis-ci.org/ReactiveX/RxJava.svg?branch=2.x'></a>
54+
[![codecov.io](http://codecov.io/github/ReactiveX/RxJava/coverage.svg?branch=2.x)](http://codecov.io/github/ReactiveX/RxJava?branch=2.x)
5455

5556
## Communication
5657

build.gradle

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ group = 'io.reactivex.rxjava2'
88
description = 'RxJava: Reactive Extensions for the JVM – a library for composing asynchronous and event-based programs using observable sequences for the Java VM.'
99

1010
apply plugin: 'java'
11+
apply plugin: 'jacoco'
1112
apply plugin: 'nebula.rxjava-project'
1213

1314
sourceCompatibility = JavaVersion.VERSION_1_6
@@ -40,3 +41,16 @@ if (project.hasProperty('release.useLastTag')) {
4041
test{
4142
maxHeapSize = "2g"
4243
}
44+
45+
jacoco {
46+
toolVersion = '0.7.7.201606060606' // See http://www.eclemma.org/jacoco/.
47+
}
48+
49+
jacocoTestReport {
50+
reports {
51+
xml.enabled = true
52+
html.enabled = true
53+
}
54+
}
55+
56+
build.dependsOn jacocoTestReport

0 commit comments

Comments
 (0)