-
Notifications
You must be signed in to change notification settings - Fork 260
Collect code coverage on CI #471
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
36225c0
to
9ace735
Compare
5aeca24
to
85ec468
Compare
d54e9b4
to
661d252
Compare
c8500aa
to
4a36281
Compare
Any idea on the warnings produced? https://dev.azure.com/dnceng/public/_build/results?buildId=465409&view=results Do you plan to fix those after checkin? |
The "multiple file or directory matches were found" warnings are not problems. You can see that the ReportGenerator will merge multiple files and generate a single report per job. I plan to remove that task after integrating some other form of reports, such as Codecov. The "failure in sending the provision message" warnings are not caused by this PR. |
I don't feel like I'm qualified to code review this, so let's merge it and see what happens. =) I'm still on vacation until Monday. |
Adds basic code coverage collection on CI.
The Arcade SDK doesn't play well with coverage tools. This PR starts Coverlet to prepare assemblies before the tests run and stops it to calculate results after tests succeed.
There are three outstanding issues till now.
The paths in embedded PDBs of assemblies built with
DeterministicSourcePaths
(which is enabled byContinuousIntegrationBuild
) flag don't point to local source, so Coverlet can't tell which assembly to process. InstrumentationHelper.HasPdb always returns false for deterministic source paths coverlet-coverage/coverlet#363Azure Pipelines coverage board doesn't merge reports from different jobs. Codecov works fine on this.
There isn't the try-finally block in MSBuild, so if any test failed... :)