Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split CI workflow jobs #144

Merged
merged 5 commits into from
Dec 2, 2024
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 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
Expand Down
Loading