Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: websocket controller #46

Merged
merged 18 commits into from
Mar 21, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
dev: jacoco testCoverage setup
  • Loading branch information
ghkdqhrbals committed Mar 20, 2024
commit 18847ffac4da30a629342780abe9d6db86e4f66f
47 changes: 47 additions & 0 deletions bm-agent/build.gradle
Original file line number Diff line number Diff line change
@@ -1,16 +1,25 @@
plugins {
id 'jacoco-report-aggregation'
id 'java'
id 'jacoco'
id 'org.springframework.boot' version '3.2.3'
id 'io.spring.dependency-management' version '1.1.4'
}

group = 'org.benchmark'
version = '0.0.1-SNAPSHOT'

def excludeJacocoTestCoverageReport = [
]

java {
sourceCompatibility = '17'
}

jacoco {
toolVersion = "0.8.8"
}

configurations {
compileOnly {
extendsFrom annotationProcessor
Expand All @@ -34,4 +43,42 @@ dependencies {

tasks.named('test') {
useJUnitPlatform()
jacoco

finalizedBy jacocoTestReport
}

jacocoTestReport {
dependsOn test
reports {
xml.required = true
}
// Set the path to the source files
classDirectories.setFrom(files(classDirectories.files.collect {
fileTree(dir: it, exclude: excludeJacocoTestCoverageReport)
}))
finalizedBy 'jacocoTestCoverageVerification'
}

// task for Jacoco test coverage verification
jacocoTestCoverageVerification {
violationRules {
rule {
// Set the path to the source files
classDirectories.setFrom(tasks.jacocoTestReport.classDirectories)
element = 'CLASS'
enabled = true

limit {
counter = 'LINE'
value = 'COVEREDRATIO'
minimum = 0.60
}
limit {
counter = 'METHOD'
value = 'COVEREDRATIO'
minimum = 0.60
}
}
}
}
13 changes: 10 additions & 3 deletions bm-controller/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
plugins {
id "org.asciidoctor.jvm.convert" version "3.3.2"
id 'jacoco-report-aggregation'
id 'java'
id 'jacoco'
// id 'jacoco'
id 'org.springframework.boot' version '3.2.3'
id 'io.spring.dependency-management' version '1.1.4'
}
Expand Down Expand Up @@ -59,6 +60,8 @@ dependencies {
runtimeOnly "io.jsonwebtoken:jjwt-jackson:0.11.1"
implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310'
implementation project(":bm-common")
implementation project(":bm-agent")
jacocoAggregation project(":bm-agent")

implementation 'org.springframework.boot:spring-boot-starter-validation'
asciidoctorExt 'org.springframework.restdocs:spring-restdocs-asciidoctor'
Expand Down Expand Up @@ -123,9 +126,13 @@ tasks.named("asciidoctor") {
*/

jacocoTestReport {
dependsOn test
dependsOn (
test,
project(':bm-agent').test
)
reports {
xml.required = true
csv.required = true
xml.required = false
}
// Set the path to the source files
classDirectories.setFrom(files(classDirectories.files.collect {
Expand Down