Must-share information (formatted with Markdown):
- Enterprise Edition - Version 9.7.1 (build 62043)
- I’m trying to get SonarQube to display my code coverage for my laravel project thanks to the to-be-continuous/php php-unit job that creates artifacts with the test results and the coverage results
- I have tried multiple paths for the sonar.php.tests.reportPath and sonar.php.coverage.reportPaths parameters
In the gitlab-ci job, if before launching the sonar-scanner job I do a “ls /src” I get my reports :
- $ ( # collapsed multi-line command
- $ ls src/reports
- php-coverage.clover.xml
- php-coverage.cobertura.xml
- php-test.xunit.xml
- $ sonar-scanner
However no matter what I do, Sonar can’t seem able to find them since I always get this result :
- ERROR: An error occurred when reading report file ‘/src/php-coverage.clover.xml’, nothing will be imported from this report. IOException: /src/php-coverage.clover.xml (No such file or directory)
(replace /src/php-coverage.clover.xml by a lot of options as said before such as /php-coverage.clover.xml, src/php-coverage.clover.xml etc…)
to-be-continuous/php does have a SonarQube analysis section however, this doesn’t seem to work for me (to be continuous... / PHP · GitLab)
Would anyone happen to know what I overlooked to fix that issue please ?
PS : I have a coverage of 100% on the php-unit test so that proves that the issue isn’t php-unit related