ci(pull-request-kotlin): single Gradle invocation for ktlint + test + kover [NO-JIRA]#302
Closed
JesperTerkelsen wants to merge 1 commit into
Closed
ci(pull-request-kotlin): single Gradle invocation for ktlint + test + kover [NO-JIRA]#302JesperTerkelsen wants to merge 1 commit into
JesperTerkelsen wants to merge 1 commit into
Conversation
…cation [NO-JIRA] The linter and test steps were two separate './gradlew --no-daemon' invocations, so Gradle paid configuration + KSP/JVM startup twice (~1m of the linter step is config before the first task even runs). The main compile is already reused between them (on-disk UP-TO-DATE), so the duplication is purely the per-invocation config/startup overhead, not recompilation. Merge ktlintCheck + test + kover into one invocation so that overhead is paid once. --continue runs all tasks even if one fails, so a ktlint failure no longer hides test results (previously the test step was skipped on lint failure). Sonar stays a separate step (conditional on skip-sonar, needs its own token, small third invocation). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Member
Author
|
Parking this — superseded by warm-on-main caching (see follow-up). The single-invocation saving (~30s) is small next to warming the main baseline so fresh PR branches aren't cold. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Merge the
ktlintCheck,test, and kover tasks into a single Gradle invocation in the Kotlin PR test job (was two separate./gradlew --no-daemonruns). Sonar stays its own step.Why
The linter and test steps are two separate
--no-daemoninvocations, so Gradle pays configuration + KSP/JVM startup twice. On a cold run that's ~1m of config before the first task even runs in the linter step, then again in the test step. The main compile is already reused between them (on-diskUP-TO-DATE— verified:compileKotlin UP-TO-DATEin the test invocation), so the duplication is purely per-invocation overhead, not recompilation.One invocation pays that overhead once.
--continueruns all tasks even if one fails, so a ktlint failure no longer hides test results — previously the separate test step was skipped when the linter step failed.Scope / risk
--continueimprovement above.skip-sonar, still skipped if the combined step fails).gradle-moduleset), tasks are module-prefixed exactly as before.Expected impact
Saves the redundant Gradle config/startup (~30s–1m on cold runs; a smaller slice on warm). Modest on its own — the bigger remaining lever is test execution (ClickHouse testcontainers +
maxParallelForks), tracked separately.Will canary on
service-feature(cold + warm) before merging to@main.🤖 Generated with Claude Code