Skip to content

Commit

Permalink
Enable test logging on CI to make it easier to follow progress
Browse files Browse the repository at this point in the history
  • Loading branch information
sghill committed Jun 30, 2024
1 parent e945e0d commit e93896a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import okio.buffer
import okio.sink
import org.gradle.api.tasks.testing.logging.TestExceptionFormat.FULL
import org.gradle.api.tasks.testing.logging.TestLogEvent
import java.nio.file.StandardOpenOption

buildscript {
Expand Down Expand Up @@ -149,9 +150,13 @@ tasks.addRule("Pattern: testGradle<ID>") {
}
}

val isCi = providers.environmentVariable("CI")
tasks.withType<Test>().configureEach {
useJUnitPlatform()
testLogging {
if (isCi.map { it.toBoolean() }.getOrElse(false)) {
events(TestLogEvent.FAILED, TestLogEvent.PASSED, TestLogEvent.SKIPPED)
}
exceptionFormat = FULL
}
}
Expand Down

0 comments on commit e93896a

Please sign in to comment.