feat: GH workflow (init)
Some checks failed
Build and Release / Quality gates (push) Failing after 1m27s
Publish Reports to GitHub Pages / Publish static reports (push) Failing after 1s
Build and Release / Publish tagged distribution (push) Has been skipped
Some checks failed
Build and Release / Quality gates (push) Failing after 1m27s
Publish Reports to GitHub Pages / Publish static reports (push) Failing after 1s
Build and Release / Publish tagged distribution (push) Has been skipped
feat: JaCoCo
This commit is contained in:
33
build.gradle
33
build.gradle
@@ -2,6 +2,7 @@ plugins {
|
||||
id 'java'
|
||||
id 'application'
|
||||
id 'pmd'
|
||||
id 'jacoco'
|
||||
id 'com.palantir.git-version' version '4.0.0'
|
||||
}
|
||||
|
||||
@@ -12,6 +13,10 @@ configurations {
|
||||
mockitoAgent
|
||||
}
|
||||
|
||||
jacoco {
|
||||
toolVersion = '0.8.14'
|
||||
}
|
||||
|
||||
pmd {
|
||||
consoleOutput = true
|
||||
toolVersion = '7.20.0'
|
||||
@@ -43,6 +48,34 @@ dependencies {
|
||||
tasks.withType(Test).configureEach {
|
||||
useJUnitPlatform()
|
||||
jvmArgs += "-javaagent:${configurations.mockitoAgent.singleFile}"
|
||||
|
||||
finalizedBy(tasks.named('jacocoTestReport'))
|
||||
|
||||
reports {
|
||||
junitXml.required = true
|
||||
html.required = true
|
||||
}
|
||||
}
|
||||
|
||||
tasks.withType(Pmd).configureEach {
|
||||
reports {
|
||||
xml.required = true
|
||||
html.required = true
|
||||
}
|
||||
}
|
||||
|
||||
tasks.named('jacocoTestReport', JacocoReport) {
|
||||
dependsOn(tasks.named('test'))
|
||||
|
||||
reports {
|
||||
xml.required = true
|
||||
csv.required = false
|
||||
html.required = true
|
||||
}
|
||||
}
|
||||
|
||||
tasks.named('check') {
|
||||
dependsOn(tasks.named('jacocoTestReport'))
|
||||
}
|
||||
|
||||
application {
|
||||
|
||||
Reference in New Issue
Block a user