diff --git a/.github/workflows/qodana_code_quality.yml b/.github/workflows/qodana_code_quality.yml index 6faea76..d646109 100644 --- a/.github/workflows/qodana_code_quality.yml +++ b/.github/workflows/qodana_code_quality.yml @@ -25,11 +25,31 @@ jobs: with: ref: ${{ github.event.pull_request.head.sha }} # to check out the actual pull request commit, not the merge commit fetch-depth: 0 # a full history is required for pull request analysis + - name: Set up JDK 25 + uses: actions/setup-java@v5 + with: + java-version: "25" + distribution: "temurin" + - name: Cache Qodana Maven repository + uses: actions/cache@v5 + with: + path: ${{ runner.temp }}/qodana/caches/.m2 + key: ${{ runner.os }}-qodana-m2-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-qodana-m2- + # Qodana's own Maven import intermittently skips downloading dependencies, + # leaving unresolved library roots that break the sanity check and produce + # bogus findings. Seed the repo it uses (/data/cache/.m2) ourselves. + - name: Warm Maven repository for Qodana + run: mvn -B -P ci -DskipTests dependency:go-offline -Dmaven.repo.local=${{ runner.temp }}/qodana/caches/.m2 - name: "Qodana Scan" uses: JetBrains/qodana-action@v2026.1 with: pr-mode: true - cache-default-branch-only: true + # built-in caching never restored (per-SHA keys) and would now + # re-upload the pre-seeded .m2 every run; the explicit + # actions/cache step above manages the Maven repo instead + use-caches: false args: --fail-threshold,0 env: QODANA_TOKEN: ${{ secrets.QODANA_TOKEN_2097965348 }}