Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Execute tests in parallel #5944

Merged
merged 4 commits into from
Apr 1, 2023
Merged

Execute tests in parallel #5944

merged 4 commits into from
Apr 1, 2023

Conversation

Goooler
Copy link
Contributor

@Goooler Goooler commented Mar 27, 2023

@codecov
Copy link

codecov bot commented Mar 27, 2023

Codecov Report

Merging #5944 (52289e5) into main (a3dfea2) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##               main    #5944   +/-   ##
=========================================
  Coverage     84.48%   84.48%           
  Complexity     3788     3788           
=========================================
  Files           546      546           
  Lines         12937    12937           
  Branches       2275     2275           
=========================================
  Hits          10930    10930           
  Misses          877      877           
  Partials       1130     1130           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@3flex
Copy link
Member

3flex commented Mar 28, 2023

I'm not sure why I haven't tried this earlier!

I think we should be a bit less aggressive though and use the suggestion from the Gradle docs which caps forks to half the processor count at most.

@Goooler
Copy link
Contributor Author

Goooler commented Mar 28, 2023

I believe we can use Runtime.getRuntime().availableProcessors() on CI, which means full cores, there are 2 cores in GHA runners, use (Runtime.getRuntime().availableProcessors() / 2).takeIf { it > 0 } ?: 1 (result is 1) here seems to be less improvement on CI.

@3flex
Copy link
Member

3flex commented Mar 28, 2023

I was thinking about local builds. Maybe make it conditional on CI environment variable to use all cores in CI but not when building locally.

build-logic/src/main/kotlin/module.gradle.kts Outdated Show resolved Hide resolved
Co-authored-by: Matthew Haughton <3flex@users.noreply.github.com>
@BraisGabin BraisGabin added this to the 1.23.0 milestone Mar 29, 2023
@BraisGabin BraisGabin added the housekeeping Marker for housekeeping tasks and refactorings label Mar 29, 2023
@schalkms schalkms merged commit 3047fa1 into detekt:main Apr 1, 2023
@Goooler Goooler deleted the test_parallel branch April 1, 2023 22:34
@Goooler Goooler mentioned this pull request Jun 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build housekeeping Marker for housekeeping tasks and refactorings
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants