mirror of https://github.com/usbharu/Hideout.git
chore: テストを並列で実行するように
This commit is contained in:
parent
b94404258e
commit
dc66402431
|
@ -1,5 +1,6 @@
|
||||||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||||
import org.openapitools.generator.gradle.plugin.tasks.GenerateTask
|
import org.openapitools.generator.gradle.plugin.tasks.GenerateTask
|
||||||
|
import kotlin.math.min
|
||||||
|
|
||||||
val ktor_version: String by project
|
val ktor_version: String by project
|
||||||
val kotlin_version: String by project
|
val kotlin_version: String by project
|
||||||
|
@ -27,6 +28,9 @@ version = "0.0.1"
|
||||||
|
|
||||||
tasks.withType<Test> {
|
tasks.withType<Test> {
|
||||||
useJUnitPlatform()
|
useJUnitPlatform()
|
||||||
|
val cpus = Runtime.getRuntime().availableProcessors()
|
||||||
|
maxParallelForks = min(1, cpus - 1)
|
||||||
|
setForkEvery(4)
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompilationTask<*>>().configureEach {
|
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompilationTask<*>>().configureEach {
|
||||||
|
|
Loading…
Reference in New Issue