From 311111b2bd3a823e0be7db89c1d5013c9c8c787c Mon Sep 17 00:00:00 2001 From: Jesper Terkelsen Date: Fri, 5 Jun 2026 08:35:40 +0200 Subject: [PATCH] ci(pull-request-kotlin): run ktlint + test + kover in one Gradle invocation [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) --- .github/workflows/pull-request-kotlin.yml | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/.github/workflows/pull-request-kotlin.yml b/.github/workflows/pull-request-kotlin.yml index 2157600..5ea9d23 100644 --- a/.github/workflows/pull-request-kotlin.yml +++ b/.github/workflows/pull-request-kotlin.yml @@ -111,7 +111,7 @@ jobs: restore-keys: | ${{ runner.os }}-sonar-${{ github.head_ref }}- ${{ runner.os }}-sonar- - - name: Run linter + - name: Lint & test with coverage env: GHL_USERNAME: ${{ secrets.GHL_USERNAME }} GHL_PASSWORD: ${{ secrets.GHL_PASSWORD }} @@ -119,18 +119,8 @@ jobs: uses: monta-app/github-workflows/.github/actions/gradle-multi-module@main with: gradle-module: ${{ inputs.gradle-module }} - gradle-tasks: 'ktlintCheck' - gradle-args: ${{ inputs.gradle-args }} - - name: Run tests with coverage - env: - GHL_USERNAME: ${{ secrets.GHL_USERNAME }} - GHL_PASSWORD: ${{ secrets.GHL_PASSWORD }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - uses: monta-app/github-workflows/.github/actions/gradle-multi-module@main - with: - gradle-module: ${{ inputs.gradle-module }} - gradle-tasks: 'test koverXmlReport koverHtmlReport' - gradle-args: ${{ inputs.gradle-args }} + gradle-tasks: 'ktlintCheck test koverXmlReport koverHtmlReport' + gradle-args: ${{ inputs.gradle-args }} --continue - name: Upload test results if: always() uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7