From d39a7d67818e769ef7068da413a584e3c978bc16 Mon Sep 17 00:00:00 2001 From: AGC <158510532+AlvaroGlezC@users.noreply.github.com> Date: Thu, 6 Jun 2024 20:34:13 +0200 Subject: [PATCH] Update build.yml --- .github/workflows/build.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 264d32b..978c6d2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -79,16 +79,18 @@ jobs: run: npm run test:coverage working-directory: syg-frontend - # Combine coverage reports if needed - - name: Combine Coverage Reports + # Copy coverage reports to a common directory if needed + - name: Prepare Coverage Reports run: | - # Assuming you have tools to combine coverage reports, add those commands here - # For example, you might use `nyc` to combine lcov reports - # This step is a placeholder and should be adapted to your specific needs + mkdir -p coverage + cp -r syg-backend/target/site/jacoco/* coverage/ + cp syg-frontend/coverage/lcov.info coverage/ # SonarCloud analysis - name: SonarCloud Analysis - run: mvn org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.javascript.lcov.reportPaths=syg-frontend/coverage/lcov.info + run: mvn org.sonarsource.scanner.maven:sonar-maven-plugin:sonar \ + -Dsonar.javascript.lcov.reportPaths=coverage/lcov.info \ + -Dsonar.coverage.jacoco.xmlReportPaths=coverage/jacoco.xml env: SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} working-directory: syg-backend