Skip to content

Commit

Permalink
Add sonar analysis to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
geo-tp authored Nov 12, 2024
1 parent 36fe669 commit 7984ce0
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ jobs:
build:
runs-on: ubuntu-latest

# This ensures the build job only runs if tests pass
needs: test
needs: test # This ensures the build job only runs if tests pass

steps:
- uses: actions/checkout@v4
Expand All @@ -55,9 +54,18 @@ jobs:
- name: Build with Maven
run: mvn -B package -DskipTests=true --file pom.xml

# Save build artefacts
- name: Upload artefacts
# Save build artifacts
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: build-artifacts
path: target/*.jar

# SonarCloud Analysis
- name: SonarCloud Scan
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: |
mvn sonar:sonar -Dsonar.projectKey=geo-tp_AutoCrud \
-Dsonar.organization=geo-tp \
-Dsonar.login=${{ secrets.SONAR_TOKEN }}

0 comments on commit 7984ce0

Please sign in to comment.