Skip to content

Commit

Permalink
Adding Codecov for Test Coverage to CircleCI yaml (getodk#1462)
Browse files Browse the repository at this point in the history
* Adds codecov badge to README

* Modifies circle yaml

* Adds jacoco plugin

* Update README.md
  • Loading branch information
shobhitagarwal1612 authored and yanokwa committed Sep 14, 2017
1 parent 2539969 commit fd6ef81
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
![Platform](https://img.shields.io/badge/platform-Android-blue.svg)
[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![Build status](https://circleci.com/gh/opendatakit/collect.svg?style=shield&circle-token=:circle-token)](https://circleci.com/gh/opendatakit/collect)
[![codecov.io](https://codecov.io/github/opendatakit/collect/branch/master/graph/badge.svg)](https://codecov.io/github/opendatakit/collect)
[![Slack status](http://slack.opendatakit.org/badge.svg)](http://slack.opendatakit.org)

ODK Collect is an Android app for filling out forms. It is designed to be used in resource-constrained environments with challenges such as unreliable connectivity or power infrastructure. ODK Collect is part of Open Data Kit (ODK), a free and open-source set of tools which help organizations author, field, and manage mobile data collection solutions. Learn more about the Open Data Kit project and its history [here](https://opendatakit.org/about/) and read about example ODK deployments [here](https://opendatakit.org/about/deployments/).
Expand Down
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
classpath 'com.dicedmelon.gradle:jacoco-android:0.1.1'
classpath 'com.google.gms:google-services:3.0.0'
}
}
Expand Down
3 changes: 2 additions & 1 deletion circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ test:
- ./gradlew findbugs -Pandroid.useDexArchive=false
- ./gradlew lint -Pandroid.useDexArchive=false
- ./gradlew checkstyle -Pandroid.useDexArchive=false
- ./gradlew testDebugUnitTest -Pandroid.useDexArchive=false
- ./gradlew build jacocoTestReport testDebugUnitTest -Pandroid.useDexArchive=false

# Instrumented tests take time, so only run them on master
# SD card needed for circleci-android22 image
Expand Down Expand Up @@ -65,3 +65,4 @@ test:

- if [ $CIRCLE_BRANCH = 'master' ]; then cp -r collect_app/build/outputs/apk $CIRCLE_ARTIFACTS; fi
- if [ $CIRCLE_BRANCH = 'master' ]; then cp -r collect_app/build/reports/androidTests/connected $CIRCLE_TEST_REPORTS/androidTests; fi
- bash <(curl -s https://codecov.io/bash)
1 change: 1 addition & 0 deletions collect_app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
apply plugin: 'com.android.application'
apply plugin: 'jacoco-android'
apply from: '../config/quality.gradle'

import com.android.ddmlib.DdmPreferences
Expand Down

0 comments on commit fd6ef81

Please sign in to comment.