chore: テストを並列で実行するように

This commit is contained in:
usbharu 2023-09-30 15:04:44 +09:00
parent b94404258e
commit dc66402431
1 changed files with 4 additions and 0 deletions

View File

@ -1,5 +1,6 @@
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import org.openapitools.generator.gradle.plugin.tasks.GenerateTask
import kotlin.math.min
val ktor_version: String by project
val kotlin_version: String by project
@ -27,6 +28,9 @@ version = "0.0.1"
tasks.withType<Test> {
useJUnitPlatform()
val cpus = Runtime.getRuntime().availableProcessors()
maxParallelForks = min(1, cpus - 1)
setForkEvery(4)
}
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompilationTask<*>>().configureEach {