Hi, I’m having trouble importing code coverage data into SonarCloud using GitHub Actions. I have been trying several alternatives but I am not able to find the solution.
My .NET solution contains several test projects. Which, when executed, generated a combined code coverage file to later be used by SonarScanner. These are my test projects:
Why is your build/test happening on Ubuntu… but then your analysis happening on Windows (with a dotnet build, but no dotnet test)? This seems to be causing an issue with the paths matching.
My intention was first to compile the solution and pass the tests and if all that was correct in a second step to do the analysis phase with SonarCloud.
How should I configure the GitHub Action workflow to achieve this? I’m new to these DevOps topics
The problem is solved. Apparently it is totally necessary to do the compilation and testing in the windows virtual machine to be able to use Sonar Scanner in .NET. If the same thing happens to someone, here is the workflow that I have composed: