-
-
Notifications
You must be signed in to change notification settings - Fork 779
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
(Try to) improve CI build reliability #3703
Conversation
detekt-gradle-plugin/src/test/kotlin/io/gitlab/arturbosch/detekt/testkit/DslGradleRunner.kt
Outdated
Show resolved
Hide resolved
I think we should hold off merging because it doesn't actually make the build more reliable, since it's still failing on the Gradle plugin merge reports test. Or I can skip the tests on Java 11 for now... At least then the build will hopefully stay green, but it's just hiding the problem. I can't reproduce locally though so I don't know how to resolve. |
Can we split it in smaller chunks? E.g. the GH Actions Cache fix could go alone imho |
7304e1b
to
26943d7
Compare
All other tests are run on the current Gradle wrapper version, so there's no need to also test a recent version in this test.
There are only 2 CPUs on Linux & Windows CI hosts, 3 on macOS, and unknown on contributor's machines. Let Gradle pick an appropriate default.
Issue detekt#2547 (comment) has been fixed.
Codecov Report
@@ Coverage Diff @@
## main #3703 +/- ##
=========================================
Coverage 78.67% 78.67%
Complexity 2888 2888
=========================================
Files 473 473
Lines 9309 9309
Branches 1704 1704
=========================================
Hits 7324 7324
Misses 1080 1080
Partials 905 905 Continue to review full report at Codecov.
|
There doesn't seem to be a direct link between the memory usage and the specific test failure that kept coming up with this change, but it seems to consistently fail otherwise so I've rolled that back. The other changes will still help reduce flakiness. |
* Only test a single older Gradle version All other tests are run on the current Gradle wrapper version, so there's no need to also test a recent version in this test. * Don't spawn more workers than # CPUs There are only 2 CPUs on Linux & Windows CI hosts, 3 on macOS, and unknown on contributor's machines. Let Gradle pick an appropriate default. * Remove unneeded Gradle cache cleanup task Issue detekt#2547 (comment) has been fixed.
These changes should all help, or at least not make things any worse, by:
reducing memory use (by not allocation 2GB heap for each Gradle integration test - 512MB is the default, and unless there are OOM errors there shouldn't be any need to increase this)