Have a Github Action running tests that I'm using dotnet-coverage to collect code coverage with. It runs great and collects fine. I've now noticed that the step does not fail when the tests fail. The exit code of the test command does not seem to affect the exit code of the collect command?
run: |
dotnet-coverage collect 'dotnet test --logger GitHubActions --configuration Release --verbosity minimal' -f xml -o 'coverage.xml'
Action Output
... All the Logging Above...
Failed! - Failed: 1, Passed: 186, Skipped: 0, Total: 187, Duration: 26 s - /runner/_work/Some.SuperDuper.Project/test/Tests/bin/Release/net6.0/Some.SuperDuper.Project.Tests.dll (net6.0)
Code coverage results: coverage.xml.
... End of Action Output..