Skip to content

Commit

Permalink
enable codecov
Browse files Browse the repository at this point in the history
Signed-off-by: Tom Eyckmans <teyckmans@gmail.com>
  • Loading branch information
teyckmans committed Jan 27, 2021
1 parent 5396f57 commit 52a1093
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ commands:
rm -rf $GRADLE_PROPS
fi
when: always
- run:
command: |
bash <(curl -s https://codecov.io/bash)
when: always
- save_cache:
paths:
- ~/.gradle/wrapper
Expand Down
14 changes: 14 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ subprojects {
plugin("idea")
plugin("org.jetbrains.kotlin.jvm")
plugin("com.jfrog.bintray")
plugin("jacoco")
}

val subProject = this
Expand Down Expand Up @@ -51,6 +52,19 @@ subprojects {
kotlinOptions.jvmTarget = "1.8"
}

tasks.named<Test>("test") {
finalizedBy(tasks.getByName("jacocoTestReport")) // report is always generated after tests run
}
tasks.named<JacocoReport>("jacocoTestReport") {
dependsOn(tasks.getByName("test")) // tests are required to run before generating the report
reports {
xml.isEnabled = true
csv.isEnabled = false
}
}

tasks.getByName("check").dependsOn(tasks.getByName("jacocoTestReport"))

tasks.named<Test>("test") {
useJUnitPlatform()
}
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.1-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

0 comments on commit 52a1093

Please sign in to comment.