Skip to content

Commit

Permalink
Execute unit tests in parallel (#2953)
Browse files Browse the repository at this point in the history
  • Loading branch information
Goooler committed Apr 26, 2023
1 parent 1632ff3 commit 43c33f6
Showing 1 changed file with 6 additions and 0 deletions.
Expand Up @@ -22,6 +22,12 @@ java {
tasks.withType<Test>().configureEach {
useJUnitPlatform()

maxParallelForks = if (System.getenv("GITHUB_ACTIONS") != null) {
Runtime.getRuntime().availableProcessors()
} else {
(Runtime.getRuntime().availableProcessors() / 2).takeIf { it > 0 } ?: 1
}

javaLauncher.set(javaToolchains.launcherFor {
languageVersion.set(dokkaBuild.testJavaLauncherVersion)
})
Expand Down

0 comments on commit 43c33f6

Please sign in to comment.