Skip to content

Commit

Permalink
build: Fix Sonar reports. (#832)
Browse files Browse the repository at this point in the history
  • Loading branch information
steve-todorov authored Aug 28, 2024
1 parent da057ec commit 68df9f0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ sonarqube {
property("sonar.token", project.findProperty("s3fs.publish.sonar.token") ?: System.getenv("S3FS_PUBLISH_SONAR_TOKEN") ?: System.getenv("SONAR_TOKEN") as String)
property("sonar.java.target", java.targetCompatibility)

val junitReports = project.layout.buildDirectory.asFile.get().resolve("test-results")
property("sonar.junit.reportsPath", arrayListOf(junitReports.resolve("test"), junitReports.resolve("it-s3")).joinToString(","))

val branch = project.findProperty("s3fs.publish.sonar.branch") ?: System.getenv("S3FS_PUBLISH_SONAR_BRANCH")
val prNumber = project.findProperty("s3fs.publish.sonar.pr.number") ?: System.getenv("S3FS_PUBLISH_SONAR_PR_NUMBER")
val prBranch = project.findProperty("s3fs.publish.sonar.pr.branch") ?: System.getenv("S3FS_PUBLISH_SONAR_PR_BRANCH")
Expand Down Expand Up @@ -163,6 +166,7 @@ tasks {

named<Test>("test") {
description = "Run unit tests"
outputs.upToDateWhen { false }
useJUnitPlatform {
filter {
excludeTestsMatching("*IT")
Expand Down

0 comments on commit 68df9f0

Please sign in to comment.