From a529a71f50fa65c02d3192c837a0df2ed92e8315 Mon Sep 17 00:00:00 2001 From: larsk21 <57503246+larsk21@users.noreply.github.com> Date: Mon, 2 Dec 2024 10:22:14 +0100 Subject: [PATCH] split CI workflow jobs --- .github/workflows/ci.yml | 66 +++++++++++++++++++++++++++++++++------- 1 file changed, 55 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bee0d4de9..6324a99cb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,23 +34,12 @@ jobs: cache: 'maven' - name: Verify build - if: matrix.os != 'ubuntu-latest' run: > ./mvnw clean verify --batch-mode --update-snapshots --no-transfer-progress - - name: Verify build with Sonar - if: matrix.os == 'ubuntu-latest' - run: > - ./mvnw clean verify javadoc:javadoc-no-fork sonar:sonar -P coverage - --batch-mode - --update-snapshots - --no-transfer-progress - env: - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - - name: Stage build results (Unix) if: matrix.os == 'ubuntu-latest' || matrix.os == 'macOS-latest' run: mkdir staging-${{ matrix.os }} && find . -path '*/target/*.jar' -exec cp {} staging-${{ matrix.os }}/ \; @@ -65,6 +54,61 @@ jobs: name: Build Results path: staging-*/ + verify-javadoc: + name: Verify JavaDoc + runs-on: ubuntu-latest + needs: [verify] + strategy: + fail-fast: true + + steps: + - name: Checkout repository + uses: actions/checkout@v4.2.2 + + - name: Setup Java and Maven cache + uses: actions/setup-java@v4.5.0 + with: + distribution: 'temurin' + java-version: '17' + check-latest: true + cache: 'maven' + + - name: Verify JavaDoc + run: > + ./mvnw clean compile javadoc:javadoc + -DskipTests + --batch-mode + --update-snapshots + --no-transfer-progress + + sonar: + name: SonarQube analysis + runs-on: ubuntu-latest + needs: [verify] + strategy: + fail-fast: true + + steps: + - name: Checkout repository + uses: actions/checkout@v4.2.2 + + - name: Setup Java and Maven cache + uses: actions/setup-java@v4.5.0 + with: + distribution: 'temurin' + java-version: '17' + check-latest: true + cache: 'maven' + + - name: Run SonarQube analysis + run: > + ./mvnw clean verify sonar:sonar -P coverage + --batch-mode + --update-snapshots + --no-transfer-progress + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + deploy-snapshot: name: Deploy snapshot runs-on: ubuntu-latest