Reporting with both angular and C# from windows github actions

We are using sonarqube 10.5.1 enterprise and have a repository that has both C# .net 4 code and angular 16 code in it. Is there a way in a windows-latest runner in github actions, to upload the code coverage for both C# and angular at the same time?

You should just need to include both parameters for importing test coverage (sonar.javascript.lcov.reportPaths and whatever the appropriate .NET parameter is) when executing your analysis command.

I have verified the opencover.xml ang files exist where I am pointing the scanner and it appears that they are processing the files to some extent. In sonarqube, I am seeing no coverage statistics at all.

..sonar\scanner\dotnet-sonarscanner begin /k:“omitted” /d:sonar.cs.opencover.reportsPaths=/TestResults//*.opencover.xml /d:sonar.token=“${{ secrets.SONAR_TOKEN }}” /“${{ secrets.SONAR_HOST_URL }}” /d:sonar.javascript.lcov.reportPaths=Source/app.AngularUI/coverage/karma-coverage/

Any ideas on what to try?

What do the logs say about the import of code coverage?

I see the lcov file is being picked up an it is erroring:

INFO: Analysing [coverage\karma-coverage\]

[5254]WARN: Could not resolve 3 file paths in [coverage\karma-coverage\]

[5255]WARN: First unresolved path: src\app\common\component\welcome-back-modal\welcome-back-modal.component.ts (Run in DEBUG mode to get full list of unresolved paths)

It appears that the scanner is producing a path that is not exactly what the actual path is on the server. Is there a way to have the scanner start at a certain path for the lcov file?

I am scratching my head on this one. The sonar scanner appears to be loading the lcov file and processing through at least a part of the file and then further down the log I get this information:

INFO: Sensor JavaScript/TypeScript Coverage [javascript]

INFO: No LCOV files were found using coverage\karma-coverage\

WARN: No coverage information will be saved because all LCOV files cannot be found.

INFO: Sensor JavaScript/TypeScript Coverage [javascript] (done) | time=30ms

What am I missing? I am not seeing any obvious messages that files are missing.