Hi,
I have a simple project with a front on Angular and a back with Java 11 (it’s an exercise). I have set up one gitHub action for the front and another one for the back. Each one runs the tests, generate coverage and launch the sonar scanner.
The logic is quite similar, it works well for the front but for the back i can’t manage to get my coverage on SonarCloud.
This is the command in the workflow :
uses: sonarSource/sonarcloud-github-action@master
with:
args: -Dproject.settings=back/sonar-project.properties
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN_BACK }}
This is the sonar project properties :
sonar.projectKey=bdrorg_demarche-ci-cd-back
sonar.organization=bdrorg
sonar.sources=back/src/main
sonar.tests=back/src/test
sonar.java.binaries=back/target/classes
sonar.coverage.jacoco.xmlReportPaths=back/target/site/jacoco-aggregate/jacoco.xml
I know that the report is well seen by the scan thanks to this log :
INFO: Sensor JaCoCo XML Report Importer [jacoco]
INFO: Importing 1 report(s). Turn your logs in debug mode in order to see the exhaustive list.
INFO: Sensor JaCoCo XML Report Importer [jacoco] (done) | time=45ms
And i know that my jacoco xml report contains a coverage that is different from 0 (i already tried steps that shows what it contains).
This is my repo : GitHub - NoBdr07/Gerez-un-projet-collaboratif-en-int-grant-une-demarche-CI-CD
I already tried to destroy and create a new project in SonarCloud. I already tried solutions from similar problems in sonar community but nothing works. It’s been a few weeks of research that’s why I’m creating this new topic.
Thank you very much !