Skip to content

Commit

Permalink
Measure flakyness (#4742)
Browse files Browse the repository at this point in the history
  • Loading branch information
BraisGabin committed Jun 22, 2022
1 parent 4979e37 commit 8dc783a
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions detekt-gradle-plugin/build.gradle.kts
Expand Up @@ -9,6 +9,7 @@ plugins {
alias(libs.plugins.pluginPublishing)
// We use this published version of the Detekt plugin to self analyse this project.
id("io.gitlab.arturbosch.detekt") version "1.20.0"
id("org.gradle.test-retry") version "1.4.0"
}

repositories {
Expand Down Expand Up @@ -189,3 +190,13 @@ afterEvaluate {
}

val String.byProperty: String? get() = findProperty(this) as? String

tasks.withType<Test>().configureEach {
retry {
@Suppress("MagicNumber")
if (System.getenv().containsKey("CI")) {
maxRetries.set(2)
maxFailures.set(20)
}
}
}

0 comments on commit 8dc783a

Please sign in to comment.