diff --git a/.gitea/workflows/sonar-scan.yaml b/.gitea/workflows/sonar-scan.yaml index 8f52e7e..65eda40 100644 --- a/.gitea/workflows/sonar-scan.yaml +++ b/.gitea/workflows/sonar-scan.yaml @@ -69,20 +69,23 @@ jobs: # SONAR_HOST_URL – e.g. http://sonarqube.example.com:9000 # # SONAR_PROJECT_KEY – e.g. spring-petclinic # # ------------------------------------------------------------------ # - - name: Build, test and analyse with SonarQube + - name: Build and test + run: | + ./mvnw -B verify \ + -Dtest='!PostgresIntegrationTests' + + - name: SonarQube analysis env: SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} SONAR_HOST_URL: ${{ vars.SONAR_HOST_URL }} run: | - ./mvnw -B verify sonar:sonar \ + ./mvnw -B sonar:sonar \ -Dsonar.projectKey=${{ vars.SONAR_PROJECT_KEY }} \ -Dsonar.projectName="Spring PetClinic" \ -Dsonar.host.url="${SONAR_HOST_URL}" \ -Dsonar.token="${SONAR_TOKEN}" \ -Dsonar.java.source=17 \ - -Dsonar.coverage.jacoco.xmlReportPaths=target/site/jacoco/jacoco.xml \ - -Dtest='!PostgresIntegrationTests,!MySqlIntegrationTests' - + -Dsonar.coverage.jacoco.xmlReportPaths=target/site/jacoco/jacoco.xml # ------------------------------------------------------------------ # # 5. Quality Gate — poll until the result is ready, fail if red # # ------------------------------------------------------------------ #