Skip to content

Commit e26a99a

Browse files
authored
Execute tests in parallel (#1874)
2 parents 5ae6a5d + d090d4b commit e26a99a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

gradle/special-tests.gradle

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ tasks.withType(Test).configureEach {
1717
maxRetries = 2
1818
maxFailures = 10
1919
}
20+
21+
// There are only 2 cores in each GitHub Action Runner, we use all of them here.
22+
maxParallelForks = Runtime.getRuntime().availableProcessors()
23+
} else {
24+
// https://docs.gradle.org/8.4/userguide/performance.html#execute_tests_in_parallel
25+
maxParallelForks = Runtime.runtime.availableProcessors().intdiv(2) ?: 1
2026
}
2127
}
2228

0 commit comments

Comments
 (0)