Skip to content

Commit

Permalink
Merge pull request #144 from vitruv-tools/split-ci-jobs
Browse files Browse the repository at this point in the history
Split CI workflow jobs
  • Loading branch information
larsk21 authored Dec 2, 2024
2 parents b9c2648 + 30961b4 commit 0f89a1a
Showing 1 changed file with 55 additions and 11 deletions.
66 changes: 55 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}/ \;
Expand All @@ -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 package 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
Expand Down

0 comments on commit 0f89a1a

Please sign in to comment.