From 3766bdace6a1a98b448f052a0c5ac3a01a1afd9b Mon Sep 17 00:00:00 2001 From: GSRN Date: Wed, 17 Sep 2025 00:44:30 +0200 Subject: [PATCH] chore: Enhance SonarQube configuration in CI workflows ### Summary of Changes - Added paths for JaCoCo coverage reports and JUnit test reports in the SonarQube configuration for `all-services.yml` and `api-gateway.yml` to improve code quality analysis. ### Expected Results - Improved accuracy of code coverage and test reporting in SonarQube, enhancing the overall quality assurance process in the CI workflows. --- .gitea/workflows/all-services.yml | 4 +++- .gitea/workflows/api-gateway.yml | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/all-services.yml b/.gitea/workflows/all-services.yml index 1d55b58..2abd07e 100644 --- a/.gitea/workflows/all-services.yml +++ b/.gitea/workflows/all-services.yml @@ -123,7 +123,9 @@ jobs: -Dsonar.host.url="${{ secrets.SONAR_HOST_URL }}" \ -Dsonar.login="${{ secrets.SONAR_TOKEN }}" \ -Dsonar.projectKey=labfusion-api-gateway \ - -Dsonar.projectName=LabFusion-API-Gateway + -Dsonar.projectName=LabFusion-API-Gateway \ + -Dsonar.coverage.jacoco.xmlReportPaths=target/site/jacoco/jacoco.xml \ + -Dsonar.junit.reportPaths=target/surefire-reports - name: Build application if: ${{ !inputs.run_tests_only && !inputs.run_sonar_only }} diff --git a/.gitea/workflows/api-gateway.yml b/.gitea/workflows/api-gateway.yml index a94a10e..bddea11 100644 --- a/.gitea/workflows/api-gateway.yml +++ b/.gitea/workflows/api-gateway.yml @@ -155,7 +155,9 @@ jobs: -Dsonar.projectKey=labfusion-api-gateway \ -Dsonar.projectName=LabFusion-API-Gateway \ -Dsonar.host.url="${{ secrets.SONAR_HOST_URL }}" \ - -Dsonar.token="${{ secrets.SONAR_TOKEN }}" + -Dsonar.token="${{ secrets.SONAR_TOKEN }}" \ + -Dsonar.coverage.jacoco.xmlReportPaths=target/site/jacoco/jacoco.xml \ + -Dsonar.junit.reportPaths=target/surefire-reports - name: Fail if no test reports found if: env.TEST_REPORTS_EXIST == 'false'