Skip to content

Commit

Permalink
added jacoco and coverall test coverage reports
Browse files Browse the repository at this point in the history
  • Loading branch information
terzerm committed Dec 31, 2017
1 parent bf77415 commit 6316789
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .travis.yml
Expand Up @@ -3,3 +3,6 @@ jdk:
- oraclejdk8
- oraclejdk7
- openjdk7

after_success:
- gradle jacocoTestReport coveralls
1 change: 1 addition & 0 deletions README.md
@@ -1,4 +1,5 @@
[![Build Status](https://travis-ci.org/tools4j/meanvar.svg?branch=master)](https://travis-ci.org/tools4j/meanvar)
[![Coverage Status](https://coveralls.io/repos/github/tools4j/meanvar/badge.svg?branch=master)](https://coveralls.io/github/tools4j/meanvar?branch=master)

# tools4j-meanvar
Tiny Java utility to incrementally calculate Mean and Standard Deviation with a numerically stable algorithm. Contains a simple utility class to incrementally calculate moving average and moving standard deviation of a data series.
Expand Down
12 changes: 11 additions & 1 deletion build.gradle
@@ -1,5 +1,7 @@
apply plugin: 'java'
apply plugin: 'license'
apply plugin: 'jacoco'
apply plugin: 'com.github.kt3k.coveralls'

sourceCompatibility = 1.7
group = "org.tools4j"
Expand All @@ -24,6 +26,7 @@ buildscript {

dependencies {
classpath 'nl.javadude.gradle.plugins:license-gradle-plugin:0.11.0'
classpath "org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.8.2"
}
}

Expand Down Expand Up @@ -57,6 +60,13 @@ javadoc {
options.overview = "src/main/java/overview.html";
}

jacocoTestReport {
reports {
xml.enabled = true // coveralls plugin depends on xml format report
html.enabled = true
}
}

task javadocJar(type: Jar) {
classifier = 'javadoc'
from javadoc
Expand All @@ -69,4 +79,4 @@ task sourcesJar(type: Jar) {

artifacts {
archives javadocJar, sourcesJar
}
}

0 comments on commit 6316789

Please sign in to comment.