From 03f94ff07cc69da9e68e7220ba4da6b568451b0f Mon Sep 17 00:00:00 2001 From: Fabian Barney Date: Fri, 22 May 2026 02:30:47 +0200 Subject: [PATCH 1/6] Fix #57 align CI stage families and quality gates --- .github/workflows/pr-tests.yml | 162 ++++++++++++++++++++++++++++++--- pom.xml | 2 +- 2 files changed, 152 insertions(+), 12 deletions(-) diff --git a/.github/workflows/pr-tests.yml b/.github/workflows/pr-tests.yml index 4e87e89..913a917 100644 --- a/.github/workflows/pr-tests.yml +++ b/.github/workflows/pr-tests.yml @@ -16,7 +16,7 @@ concurrency: cancel-in-progress: true jobs: - test: + build: if: ${{ github.event.pull_request.draft == false }} runs-on: ubuntu-latest @@ -31,12 +31,109 @@ jobs: java-version: "21" cache: maven - - name: Run Maven test with NullAway - run: ./mvnw -B -ntp -Pnullaway test + - name: Set Maven wrapper permissions + run: chmod +x mvnw - crap-java: - name: crap-java Gate + - name: Build + run: ./mvnw -B -ntp -P!quality-gates-all,nullaway -DskipTests install + + - name: Upload Maven repository + uses: actions/upload-artifact@v4 + with: + name: maven-repository + path: ~/.m2/repository + if-no-files-found: error + + - name: Upload build outputs + uses: actions/upload-artifact@v4 + with: + name: build-target + path: target + if-no-files-found: error + + test-unit: + name: test / unit if: ${{ github.event.pull_request.draft == false }} + needs: + - build + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v6 + + - name: Set up JDK 21 + uses: actions/setup-java@v5 + with: + distribution: temurin + java-version: "21" + + - name: Set Maven wrapper permissions + run: chmod +x mvnw + + - name: Download Maven repository + uses: actions/download-artifact@v4 + with: + name: maven-repository + path: ~/.m2/repository + + - name: Download build outputs + uses: actions/download-artifact@v4 + with: + name: build-target + path: target + + - name: Run unit tests + run: ./mvnw -B -ntp -P!quality-gates-all,nullaway -o verify + + - name: Upload JaCoCo report + uses: actions/upload-artifact@v4 + with: + name: jacoco-report + path: target/site/jacoco + if-no-files-found: error + + package: + if: ${{ github.event.pull_request.draft == false }} + needs: + - build + - test-unit + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v6 + + - name: Set up JDK 21 + uses: actions/setup-java@v5 + with: + distribution: temurin + java-version: "21" + + - name: Set Maven wrapper permissions + run: chmod +x mvnw + + - name: Download Maven repository + uses: actions/download-artifact@v4 + with: + name: maven-repository + path: ~/.m2/repository + + - name: Download build outputs + uses: actions/download-artifact@v4 + with: + name: build-target + path: target + + - name: Run package build + run: ./mvnw -B -ntp -P!quality-gates-all,nullaway -o -DskipTests package + + quality-crap-utils-java: + name: verify / quality-crap-utils-java + if: ${{ github.event.pull_request.draft == false }} + needs: + - build + - test-unit runs-on: ubuntu-latest steps: @@ -48,14 +145,37 @@ jobs: with: distribution: temurin java-version: "21" - cache: maven + + - name: Set Maven wrapper permissions + run: chmod +x mvnw + + - name: Download Maven repository + uses: actions/download-artifact@v4 + with: + name: maven-repository + path: ~/.m2/repository + + - name: Download build outputs + uses: actions/download-artifact@v4 + with: + name: build-target + path: target + + - name: Download JaCoCo report + uses: actions/download-artifact@v4 + with: + name: jacoco-report + path: target/site/jacoco - name: Run crap-java gate - run: ./mvnw -B -ntp -P!quality-gates-all,quality-gate-crap verify + run: ./mvnw -B -ntp -P!quality-gates-all,quality-gate-crap,nullaway -o verify - cognitive-java: - name: cognitive-java Gate + quality-cognitive-utils-java: + name: verify / quality-cognitive-utils-java if: ${{ github.event.pull_request.draft == false }} + needs: + - build + - test-unit runs-on: ubuntu-latest steps: @@ -67,7 +187,27 @@ jobs: with: distribution: temurin java-version: "21" - cache: maven + + - name: Set Maven wrapper permissions + run: chmod +x mvnw + + - name: Download Maven repository + uses: actions/download-artifact@v4 + with: + name: maven-repository + path: ~/.m2/repository + + - name: Download build outputs + uses: actions/download-artifact@v4 + with: + name: build-target + path: target + + - name: Download JaCoCo report + uses: actions/download-artifact@v4 + with: + name: jacoco-report + path: target/site/jacoco - name: Run cognitive-java gate - run: ./mvnw -B -ntp -P!quality-gates-all,quality-gate-cognitive verify + run: ./mvnw -B -ntp -P!quality-gates-all,quality-gate-cognitive,nullaway -o verify diff --git a/pom.xml b/pom.xml index 4c2dba7..3d6f9f7 100644 --- a/pom.xml +++ b/pom.xml @@ -32,7 +32,7 @@ 0.0.1-SNAPSHOT HEAD - 0.3.2 + 0.5.0 0.4.0 21 UTF-8 From 4d3f13a20e2f51fdd62ee1c3398e9112cfc86f9b Mon Sep 17 00:00:00 2001 From: Fabian Barney Date: Fri, 22 May 2026 02:51:42 +0200 Subject: [PATCH 2/6] Fix CI follow-up for issue #57 --- .github/workflows/pr-tests.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pr-tests.yml b/.github/workflows/pr-tests.yml index 913a917..2869eec 100644 --- a/.github/workflows/pr-tests.yml +++ b/.github/workflows/pr-tests.yml @@ -84,7 +84,7 @@ jobs: path: target - name: Run unit tests - run: ./mvnw -B -ntp -P!quality-gates-all,nullaway -o verify + run: ./mvnw -B -ntp -P!quality-gates-all,nullaway verify - name: Upload JaCoCo report uses: actions/upload-artifact@v4 @@ -126,7 +126,7 @@ jobs: path: target - name: Run package build - run: ./mvnw -B -ntp -P!quality-gates-all,nullaway -o -DskipTests package + run: ./mvnw -B -ntp -P!quality-gates-all,nullaway -DskipTests package quality-crap-utils-java: name: verify / quality-crap-utils-java @@ -168,7 +168,7 @@ jobs: path: target/site/jacoco - name: Run crap-java gate - run: ./mvnw -B -ntp -P!quality-gates-all,quality-gate-crap,nullaway -o verify + run: ./mvnw -B -ntp -P!quality-gates-all,quality-gate-crap,nullaway verify quality-cognitive-utils-java: name: verify / quality-cognitive-utils-java @@ -210,4 +210,4 @@ jobs: path: target/site/jacoco - name: Run cognitive-java gate - run: ./mvnw -B -ntp -P!quality-gates-all,quality-gate-cognitive,nullaway -o verify + run: ./mvnw -B -ntp -P!quality-gates-all,quality-gate-cognitive,nullaway verify From 48adc22ecf47b9d82228e77a78ea63c48c15812c Mon Sep 17 00:00:00 2001 From: Fabian Barney Date: Fri, 22 May 2026 09:56:10 +0200 Subject: [PATCH 3/6] Fix CI follow-up for issue #57 --- .github/workflows/pr-tests.yml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/pr-tests.yml b/.github/workflows/pr-tests.yml index 2869eec..f71a8e5 100644 --- a/.github/workflows/pr-tests.yml +++ b/.github/workflows/pr-tests.yml @@ -38,14 +38,14 @@ jobs: run: ./mvnw -B -ntp -P!quality-gates-all,nullaway -DskipTests install - name: Upload Maven repository - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: maven-repository path: ~/.m2/repository if-no-files-found: error - name: Upload build outputs - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: build-target path: target @@ -72,13 +72,13 @@ jobs: run: chmod +x mvnw - name: Download Maven repository - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v8 with: name: maven-repository path: ~/.m2/repository - name: Download build outputs - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v8 with: name: build-target path: target @@ -87,7 +87,7 @@ jobs: run: ./mvnw -B -ntp -P!quality-gates-all,nullaway verify - name: Upload JaCoCo report - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: jacoco-report path: target/site/jacoco @@ -114,13 +114,13 @@ jobs: run: chmod +x mvnw - name: Download Maven repository - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v8 with: name: maven-repository path: ~/.m2/repository - name: Download build outputs - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v8 with: name: build-target path: target @@ -150,19 +150,19 @@ jobs: run: chmod +x mvnw - name: Download Maven repository - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v8 with: name: maven-repository path: ~/.m2/repository - name: Download build outputs - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v8 with: name: build-target path: target - name: Download JaCoCo report - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v8 with: name: jacoco-report path: target/site/jacoco @@ -192,19 +192,19 @@ jobs: run: chmod +x mvnw - name: Download Maven repository - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v8 with: name: maven-repository path: ~/.m2/repository - name: Download build outputs - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v8 with: name: build-target path: target - name: Download JaCoCo report - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v8 with: name: jacoco-report path: target/site/jacoco From cffbb691097c02d44bdc7553f8fb7838e2b1bbbf Mon Sep 17 00:00:00 2001 From: Fabian Barney Date: Fri, 22 May 2026 10:11:02 +0200 Subject: [PATCH 4/6] Fix Maven artifact reuse paths in PR CI --- .github/workflows/pr-tests.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/pr-tests.yml b/.github/workflows/pr-tests.yml index f71a8e5..f18cee9 100644 --- a/.github/workflows/pr-tests.yml +++ b/.github/workflows/pr-tests.yml @@ -41,7 +41,7 @@ jobs: uses: actions/upload-artifact@v7 with: name: maven-repository - path: ~/.m2/repository + path: /home/runner/.m2/repository if-no-files-found: error - name: Upload build outputs @@ -75,7 +75,7 @@ jobs: uses: actions/download-artifact@v8 with: name: maven-repository - path: ~/.m2/repository + path: /home/runner/.m2/repository - name: Download build outputs uses: actions/download-artifact@v8 @@ -117,7 +117,7 @@ jobs: uses: actions/download-artifact@v8 with: name: maven-repository - path: ~/.m2/repository + path: /home/runner/.m2/repository - name: Download build outputs uses: actions/download-artifact@v8 @@ -153,7 +153,7 @@ jobs: uses: actions/download-artifact@v8 with: name: maven-repository - path: ~/.m2/repository + path: /home/runner/.m2/repository - name: Download build outputs uses: actions/download-artifact@v8 @@ -168,7 +168,7 @@ jobs: path: target/site/jacoco - name: Run crap-java gate - run: ./mvnw -B -ntp -P!quality-gates-all,quality-gate-crap,nullaway verify + run: ./mvnw -B -ntp -P!quality-gates-all,quality-gate-crap,nullaway -DskipTests verify quality-cognitive-utils-java: name: verify / quality-cognitive-utils-java @@ -195,7 +195,7 @@ jobs: uses: actions/download-artifact@v8 with: name: maven-repository - path: ~/.m2/repository + path: /home/runner/.m2/repository - name: Download build outputs uses: actions/download-artifact@v8 @@ -210,4 +210,4 @@ jobs: path: target/site/jacoco - name: Run cognitive-java gate - run: ./mvnw -B -ntp -P!quality-gates-all,quality-gate-cognitive,nullaway verify + run: ./mvnw -B -ntp -P!quality-gates-all,quality-gate-cognitive,nullaway -DskipTests verify From b70236036046cdf207eb2ad56fbb8afd906d5947 Mon Sep 17 00:00:00 2001 From: Fabian Barney Date: Fri, 22 May 2026 10:26:56 +0200 Subject: [PATCH 5/6] Use runner.home for Maven artifacts --- .github/workflows/pr-tests.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pr-tests.yml b/.github/workflows/pr-tests.yml index f18cee9..c0245f6 100644 --- a/.github/workflows/pr-tests.yml +++ b/.github/workflows/pr-tests.yml @@ -41,7 +41,7 @@ jobs: uses: actions/upload-artifact@v7 with: name: maven-repository - path: /home/runner/.m2/repository + path: ${{ runner.home }}/.m2/repository if-no-files-found: error - name: Upload build outputs @@ -75,7 +75,7 @@ jobs: uses: actions/download-artifact@v8 with: name: maven-repository - path: /home/runner/.m2/repository + path: ${{ runner.home }}/.m2/repository - name: Download build outputs uses: actions/download-artifact@v8 @@ -117,7 +117,7 @@ jobs: uses: actions/download-artifact@v8 with: name: maven-repository - path: /home/runner/.m2/repository + path: ${{ runner.home }}/.m2/repository - name: Download build outputs uses: actions/download-artifact@v8 @@ -153,7 +153,7 @@ jobs: uses: actions/download-artifact@v8 with: name: maven-repository - path: /home/runner/.m2/repository + path: ${{ runner.home }}/.m2/repository - name: Download build outputs uses: actions/download-artifact@v8 @@ -195,7 +195,7 @@ jobs: uses: actions/download-artifact@v8 with: name: maven-repository - path: /home/runner/.m2/repository + path: ${{ runner.home }}/.m2/repository - name: Download build outputs uses: actions/download-artifact@v8 From a2a5873b1917f29886f7a9d5fc1c24054f5db9a7 Mon Sep 17 00:00:00 2001 From: Fabian Barney Date: Fri, 22 May 2026 10:31:38 +0200 Subject: [PATCH 6/6] Restore working Maven artifact path --- .github/workflows/pr-tests.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pr-tests.yml b/.github/workflows/pr-tests.yml index c0245f6..f18cee9 100644 --- a/.github/workflows/pr-tests.yml +++ b/.github/workflows/pr-tests.yml @@ -41,7 +41,7 @@ jobs: uses: actions/upload-artifact@v7 with: name: maven-repository - path: ${{ runner.home }}/.m2/repository + path: /home/runner/.m2/repository if-no-files-found: error - name: Upload build outputs @@ -75,7 +75,7 @@ jobs: uses: actions/download-artifact@v8 with: name: maven-repository - path: ${{ runner.home }}/.m2/repository + path: /home/runner/.m2/repository - name: Download build outputs uses: actions/download-artifact@v8 @@ -117,7 +117,7 @@ jobs: uses: actions/download-artifact@v8 with: name: maven-repository - path: ${{ runner.home }}/.m2/repository + path: /home/runner/.m2/repository - name: Download build outputs uses: actions/download-artifact@v8 @@ -153,7 +153,7 @@ jobs: uses: actions/download-artifact@v8 with: name: maven-repository - path: ${{ runner.home }}/.m2/repository + path: /home/runner/.m2/repository - name: Download build outputs uses: actions/download-artifact@v8 @@ -195,7 +195,7 @@ jobs: uses: actions/download-artifact@v8 with: name: maven-repository - path: ${{ runner.home }}/.m2/repository + path: /home/runner/.m2/repository - name: Download build outputs uses: actions/download-artifact@v8