Skip to content

Commit c78bdd3

Browse files
authored
Merge pull request #18 from mstachniuk/code-cov
Add Jacoco Test coverage
2 parents d8a4d0e + 497d9c9 commit c78bdd3

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

.travis.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,6 @@ branches:
1919
#Build and perform release (if needed)
2020
script:
2121
- ./gradlew build -s && ./gradlew ciPerformRelease
22+
23+
after_success:
24+
- bash <(curl -s https://codecov.io/bash)

core/build.gradle

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ buildscript {
1515

1616
apply plugin: 'kotlin'
1717
apply plugin: 'org.jetbrains.dokka'
18+
apply plugin: "jacoco"
1819

1920
description = 'Generate GraphQL Schema (GraphQL DSL or SDL) based on introspection query result'
2021

@@ -46,6 +47,9 @@ tasks.withType(Test) {
4647
testLogging {
4748
events("passed", "skipped", "failed")
4849
}
50+
jacoco {
51+
destinationFile = file("${buildDir}/jacoco/test.exec")
52+
}
4953
}
5054

5155
task ktlint(type: JavaExec, group: "verification") {
@@ -66,3 +70,17 @@ dokka {
6670
}
6771
}
6872
javadoc.dependsOn dokka
73+
74+
jacoco {
75+
toolVersion = "0.8.1"
76+
}
77+
78+
jacocoTestReport {
79+
reports {
80+
xml.enabled true
81+
csv.enabled false
82+
html.destination file("${buildDir}/jacocoHtml")
83+
}
84+
}
85+
86+
build.dependsOn jacocoTestReport

0 commit comments

Comments
 (0)