Add Codecov settings

This commit is contained in:
Yusuke Matsubara 2017-05-20 20:27:28 +09:00
parent 67dfa170d2
commit 3b1a902636
3 changed files with 12 additions and 2 deletions

View file

@ -22,9 +22,14 @@ before_script:
- emulator -avd test -no-audio -no-window &
- android-wait-for-emulator
script:
- ./gradlew test connectedAndroidTest -stacktrace
- ./gradlew check connectedCheck jacocoTestReport -stacktrace
after_success:
- bash <(curl -s https://codecov.io/bash)
after_failure:
- echo '*** Connected Test Rsults ***'
- w3m -dump ${TRAVIS_BUILD_DIR}/app/build/reports/androidTests/connected/*Test.html
- echo '*** Lint Results ***'
- cat ${TRAVIS_BUILD_DIR}/app/build/reports/lint-results.xml
jdk:
# - openjdk8 # not yet available
- oraclejdk8

View file

@ -1,4 +1,5 @@
apply plugin: 'com.android.application'
apply plugin: 'jacoco-android'
apply from: 'quality.gradle'
dependencies {
@ -53,6 +54,9 @@ android {
minifyEnabled false // See https://stackoverflow.com/questions/40232404/google-play-apk-and-android-studio-apk-usb-debug-behaving-differently - proguard.cfg modification alone insufficient.
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
debug {
testCoverageEnabled true
}
}
lintOptions {

View file

@ -6,6 +6,7 @@ buildscript {
}
dependencies {
classpath "com.android.tools.build:gradle:${project.gradleVersion}"
classpath 'com.dicedmelon.gradle:jacoco-android:0.1.1'
}
}