BathiyaL
(Bathiya Ladduwahetty)
August 9, 2022, 2:57pm
1
Hi
I have following GitHub action setup and integrated with Sonarcloud, I can see static code analysis information but Jacoco code coverage is not updating.
GitHub action : Add RulesRelatesToMethods · BathiyaL/code-quality-analysis@7640628 · GitHub
name: Build and analyze
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: mvn clean test -B -X sonar:sonar -Pcoverage org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=BathiyaL_code-quality-analysis
appreciate your help on this
Colin
(Colin)
August 9, 2022, 3:48pm
2
It sure looks like coverage is importing:
2022-08-09T14:50:47.1145333Z [INFO] 14:50:47.114 Importing 1 report(s). Turn your logs in debug mode in order to see the exhaustive list.
2022-08-09T14:50:47.1149134Z [DEBUG] 14:50:47.114 Reading report '/home/runner/work/code-quality-analysis/code-quality-analysis/target/site/jacoco/jacoco.xml'
2022-08-09T14:50:47.1342832Z [INFO] 14:50:47.134 Sensor JaCoCo XML Report Importer [jacoco] (done) | time=23ms
2022-08-09T14:50:47.1348591Z [INFO] 14:50:47.134 Sensor CSS Rules [javascript]
It just appears that no tests have been written that cover the code introduced in your pull request.
BathiyaL
(Bathiya Ladduwahetty)
August 10, 2022, 2:46am
3
Hey Colin, Thank you very much for the information.
you are correct, it works fine with the new code changes. The coverage I was expecting was not in the new code(PR) and I didn’t realize this.
1 Like
system
(system)
Closed
August 17, 2022, 2:46am
4
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.