diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 580e0f0..e9596af 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -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 @@ -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 }}