mirror of
https://github.com/Prominence/openweathermap-java-api.git
synced 2026-01-09 19:46:41 +03:00
Added jacoco test coverage report generation.
This commit is contained in:
parent
d1bac609e8
commit
e6833c3007
10
.cirrus.yml
10
.cirrus.yml
@ -1,13 +1,15 @@
|
||||
container:
|
||||
image: gradle:jdk11
|
||||
image: gradle:jdk17
|
||||
|
||||
check_task:
|
||||
testCoverage_task:
|
||||
gradle_cache:
|
||||
folder: ~/.gradle/caches
|
||||
check_script: gradle check
|
||||
check_script: gradle jacocoTestReport
|
||||
cleanup_before_cache_script:
|
||||
- rm -rf ~/.gradle/caches/$GRADLE_VERSION/
|
||||
- rm -rf ~/.gradle/caches/transforms-1
|
||||
- rm -rf ~/.gradle/caches/journal-1
|
||||
- rm -rf ~/.gradle/caches/jars-3/*/buildSrc.jar
|
||||
- find ~/.gradle/caches/ -name "*.lock" -type f -delete
|
||||
- find ~/.gradle/caches/ -name "*.lock" -type f -delete
|
||||
always:
|
||||
sendCoverageStatistics: bash <(curl -s https://codecov.io/bash)
|
||||
|
||||
17
build.gradle
17
build.gradle
@ -2,6 +2,7 @@ plugins {
|
||||
id 'java-library'
|
||||
id 'maven-publish'
|
||||
id 'signing'
|
||||
id 'jacoco'
|
||||
}
|
||||
|
||||
repositories {
|
||||
@ -21,7 +22,7 @@ dependencies {
|
||||
group = 'com.github.prominence'
|
||||
version = '3.0.0-SNAPSHOT'
|
||||
description = 'Java OpenWeatherMap API'
|
||||
java.sourceCompatibility = JavaVersion.VERSION_11
|
||||
java.sourceCompatibility = JavaVersion.VERSION_17
|
||||
|
||||
ext {
|
||||
isReleaseVersion = !version.endsWith("SNAPSHOT")
|
||||
@ -32,6 +33,10 @@ java {
|
||||
withJavadocJar()
|
||||
}
|
||||
|
||||
test {
|
||||
useJUnitPlatform()
|
||||
}
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
mavenJava(MavenPublication) {
|
||||
@ -94,3 +99,13 @@ tasks.withType(JavaCompile) {
|
||||
tasks.withType(GenerateModuleMetadata) {
|
||||
enabled = false
|
||||
}
|
||||
|
||||
jacocoTestReport {
|
||||
dependsOn test // tests are required to run before generating the report
|
||||
reports {
|
||||
xml.required = false
|
||||
csv.required = false
|
||||
html.outputLocation = layout.buildDirectory.dir('jacocoHtml')
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user