File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change
1
+ apply plugin : ' org.gradle.test-retry'
2
+
1
3
def special = [
2
4
' Npm' ,
3
5
' Black' ,
4
6
' Clang'
5
7
]
6
8
9
+ boolean isCiServer = true
7
10
tasks. named(' test' ) {
8
11
// See com.diffplug.spotless.tag package for available JUnit 5 @Tag annotations
9
12
useJUnitPlatform {
10
13
excludeTags special as String []
11
14
}
15
+ if (isCiServer) {
16
+ retry {
17
+ maxRetries = 2
18
+ maxFailures = 2
19
+ }
20
+ }
12
21
}
13
22
14
23
special. forEach { tag ->
Original file line number Diff line number Diff line change @@ -9,6 +9,8 @@ pluginManagement {
9
9
id ' com.github.spotbugs' version ' 4.7.8'
10
10
// https://github.com/diffplug/spotless-changelog
11
11
id ' com.diffplug.spotless-changelog' version ' 2.2.0'
12
+ // https://github.com/gradle/test-retry-gradle-plugin/releases
13
+ id ' org.gradle.test-retry' version ' 1.3.1'
12
14
}
13
15
}
14
16
plugins {
@@ -17,6 +19,7 @@ plugins {
17
19
id ' io.github.gradle-nexus.publish-plugin' apply false
18
20
id ' com.github.spotbugs' apply false
19
21
id ' com.diffplug.spotless-changelog' apply false
22
+ id ' org.gradle.test-retry' apply false
20
23
}
21
24
if (System . env[' CI' ] != null ) {
22
25
// use the remote buildcache on all CI builds
You can’t perform that action at this time.
0 commit comments