From eaa8f1cfc2aadcfb42efd308d8d25788ab71c5c1 Mon Sep 17 00:00:00 2001 From: Rick Porter Date: Wed, 4 Nov 2026 05:41:47 -0500 Subject: [PATCH 1/2] Split pipelines into smaller jobs for lint, depend-checks, test, and build --- .github/workflows/merge.yaml | 45 +++++++++++++++++++++++++++++++----- .github/workflows/pr.yaml | 42 +++++++++++++++++++++++++++++---- 2 files changed, 76 insertions(+), 11 deletions(-) diff --git a/.github/workflows/merge.yaml b/.github/workflows/merge.yaml index 8b9ee51..e631036 100644 --- a/.github/workflows/merge.yaml +++ b/.github/workflows/merge.yaml @@ -16,7 +16,7 @@ on: - '.github/badges/**' jobs: - build: + lint: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -30,18 +30,37 @@ jobs: - name: Check coding style run: mvn -B -ntp checkstyle:check + depend-checks: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Set up JDK 11 + uses: actions/setup-java@v3 + with: + java-version: '11' + distribution: 'temurin' + cache: maven + - name: Dependency tree run: mvn -B -ntp dependency:tree - name: Dependency checking run: mvn -B -ntp dependency:analyze-only + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Set up JDK 11 + uses: actions/setup-java@v3 + with: + java-version: '11' + distribution: 'temurin' + cache: maven + - name: Unit test and coverage run: mvn -B -ntp test jacoco:report - - name: Build with Maven - run: mvn -B -ntp -DskipTests=true -Dcheckstyle.skip package - - name: Code Coverage Report id: jacoco uses: madrapps/jacoco-report@v1.3 @@ -50,15 +69,29 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} min-coverage-overall: 80 min-coverage-changed-files: 90 - + - name: Upload Coverage Report uses: actions/upload-artifact@v4 with: name: jacoco-report path: target/site/jacoco/ + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Set up JDK 11 + uses: actions/setup-java@v3 + with: + java-version: '11' + distribution: 'temurin' + cache: maven + + - name: Build with Maven + run: mvn -B -ntp -DskipTests=true -Dcheckstyle.skip package + badges: - needs: build + needs: [lint, depend-checks, test, build] runs-on: ubuntu-latest steps: - name: Create badge app token diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index ce5d293..c0f9bb5 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -14,7 +14,7 @@ on: - main jobs: - build: + lint: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -28,18 +28,37 @@ jobs: - name: Check coding style run: mvn -B -ntp checkstyle:check + depend-checks: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Set up JDK 11 + uses: actions/setup-java@v3 + with: + java-version: '11' + distribution: 'temurin' + cache: maven + - name: Dependency tree run: mvn -B -ntp dependency:tree - name: Dependency checking run: mvn -B -ntp dependency:analyze-only + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Set up JDK 11 + uses: actions/setup-java@v3 + with: + java-version: '11' + distribution: 'temurin' + cache: maven + - name: Unit test and coverage run: mvn -B -ntp test jacoco:report - - name: Build with Maven - run: mvn -B -ntp -DskipTests=true -Dcheckstyle.skip package - - name: Code Coverage Report id: jacoco uses: madrapps/jacoco-report@v1.3 @@ -48,10 +67,23 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} min-coverage-overall: 80 min-coverage-changed-files: 90 - + - name: Upload Coverage Report uses: actions/upload-artifact@v4 with: name: jacoco-report path: target/site/jacoco/ + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Set up JDK 11 + uses: actions/setup-java@v3 + with: + java-version: '11' + distribution: 'temurin' + cache: maven + + - name: Build with Maven + run: mvn -B -ntp -DskipTests=true -Dcheckstyle.skip package From 0e4198a9c077be8ca73cdf96feb837ddfa5d960d Mon Sep 17 00:00:00 2001 From: Rick Porter Date: Wed, 4 Nov 2026 05:49:51 -0500 Subject: [PATCH 2/2] Print coverage report to console too --- .github/workflows/merge.yaml | 2 +- .github/workflows/pr.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/merge.yaml b/.github/workflows/merge.yaml index e631036..4944804 100644 --- a/.github/workflows/merge.yaml +++ b/.github/workflows/merge.yaml @@ -59,7 +59,7 @@ jobs: cache: maven - name: Unit test and coverage - run: mvn -B -ntp test jacoco:report + run: mvn -B -ntp test jacoco:report jacoco-console-reporter:report - name: Code Coverage Report id: jacoco diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index c0f9bb5..22e25fd 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -57,7 +57,7 @@ jobs: cache: maven - name: Unit test and coverage - run: mvn -B -ntp test jacoco:report + run: mvn -B -ntp test jacoco:report jacoco-console-reporter:report - name: Code Coverage Report id: jacoco