Skip to content

Commit

Permalink
Execute tests in parallel
Browse files Browse the repository at this point in the history
  • Loading branch information
Goooler committed Nov 2, 2023
1 parent 5ae6a5d commit d090d4b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions gradle/special-tests.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ tasks.withType(Test).configureEach {
maxRetries = 2
maxFailures = 10
}

// There are only 2 cores in each GitHub Action Runner, we use all of them here.
maxParallelForks = Runtime.getRuntime().availableProcessors()
} else {
// https://docs.gradle.org/8.4/userguide/performance.html#execute_tests_in_parallel
maxParallelForks = Runtime.runtime.availableProcessors().intdiv(2) ?: 1
}
}

Expand Down

0 comments on commit d090d4b

Please sign in to comment.