Skip to content

Commit 57f429f

Browse files
author
Langston Smith
authored
Adding code coverage report generation and upload to Codecov (#925)
* initial additions * adding badge to readme
1 parent a449326 commit 57f429f

17 files changed

Lines changed: 25 additions & 4 deletions

File tree

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
<a href="https://circleci.com/gh/mapbox/mapbox-java">
1414
<img src="https://circleci.com/gh/mapbox/mapbox-java.svg?style=shield&circle-token=:circle-token">
1515
</a>
16-
<a href="https://sonarcloud.io/dashboard?id=mapbox-java-services%3Amaster"><img src="https://sonarcloud.io/api/badges/gate?key=mapbox-java-services%3Amaster"/></a>
16+
<a href="https://codecov.io/gh/mapbox/mapbox-java">
17+
<img src="https://codecov.io/gh/mapbox/mapbox-java/branch/master/graph/badge.svg">
1718
</p>
1819
<br>
1920

build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ buildscript {
1717
classpath pluginDependencies.errorprone
1818
classpath pluginDependencies.sonarqube
1919
classpath pluginDependencies.buildConfig
20+
classpath pluginDependencies.jacoco
2021
}
2122
}
2223

circle.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,12 @@ jobs:
4141
path: mapbox/app/build/reports
4242
destination: reports
4343
- store_test_results:
44-
path: mapbox/app/build/test-results
44+
path: mapbox/app/build/test-results
45+
- run:
46+
name: Post code coverage report to Codecov.io
47+
command: |
48+
bash <(curl -s https://codecov.io/bash)
49+
4550
4651
# ------------------------------------------------------------------------------
4752
release:

gradle/dependencies.gradle

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ ext {
1515

1616
pluginVersion = [
1717
checkstyle : '8.11.0',
18-
jacoco : '0.8.1',
18+
jacoco : '0.13.0',
1919
errorprone : '0.0.14',
2020
spotbugs : '1.3',
2121
sonarqube : '2.5',
@@ -46,6 +46,7 @@ ext {
4646
sonarqube : "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:${pluginVersion.sonarqube}",
4747
errorprone : "net.ltgt.gradle:gradle-errorprone-plugin:${pluginVersion.errorprone}",
4848
buildConfig: "gradle.plugin.de.fuerstenau:BuildConfigPlugin:${pluginVersion.buildConfig}",
49-
dependencyGraph: "com.vanniktech:gradle-dependency-graph-generator-plugin:${pluginVersion.dependencyGraph}"
49+
dependencyGraph: "com.vanniktech:gradle-dependency-graph-generator-plugin:${pluginVersion.dependencyGraph}",
50+
jacoco : "com.vanniktech:gradle-android-junit-jacoco-plugin:${pluginVersion.jacoco}"
5051
]
5152
}

services-core/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
apply plugin: 'java-library'
22
apply plugin: 'de.fuerstenau.buildconfig'
3+
apply plugin: "com.vanniktech.android.junit.jacoco"
34

45
configurations {
56
testOutput

services-directions/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
apply plugin: 'java-library'
2+
apply plugin: "com.vanniktech.android.junit.jacoco"
23

34
dependencies {
45
api project(":services-core")

services-geocoding/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
apply plugin: 'java-library'
2+
apply plugin: "com.vanniktech.android.junit.jacoco"
23

34
dependencies {
45

services-geojson/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
apply plugin: 'java-library'
2+
apply plugin: "com.vanniktech.android.junit.jacoco"
23

34
dependencies {
45
// Gson

services-matching/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
apply plugin: 'java-library'
2+
apply plugin: "com.vanniktech.android.junit.jacoco"
23

34
dependencies {
45
api project(":services-directions")

services-matrix/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
apply plugin: 'java-library'
2+
apply plugin: "com.vanniktech.android.junit.jacoco"
23

34
dependencies {
45
api project(":services-directions")

0 commit comments

Comments
 (0)