Skip to content
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

Collect code coverage on CI #471

Merged
merged 10 commits into from
Dec 27, 2019
Merged

Collect code coverage on CI #471

merged 10 commits into from
Dec 27, 2019

Conversation

nxtn
Copy link
Contributor

@nxtn nxtn commented Dec 21, 2019

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.

  1. The paths in embedded PDBs of assemblies built with DeterministicSourcePaths(which is enabled by ContinuousIntegrationBuild) 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#363

  2. Azure Pipelines coverage board doesn't merge reports from different jobs. Codecov works fine on this.

  3. There isn't the try-finally block in MSBuild, so if any test failed... :)

@nxtn nxtn force-pushed the pipelines branch 3 times, most recently from 36225c0 to 9ace735 Compare December 23, 2019 06:48
@nxtn nxtn force-pushed the pipelines branch 2 times, most recently from 5aeca24 to 85ec468 Compare December 23, 2019 07:22
@nxtn nxtn force-pushed the pipelines branch 22 times, most recently from d54e9b4 to 661d252 Compare December 23, 2019 19:14
@nxtn nxtn force-pushed the pipelines branch 2 times, most recently from c8500aa to 4a36281 Compare December 23, 2019 20:58
@nxtn nxtn marked this pull request as ready for review December 23, 2019 21:00
@nxtn nxtn changed the title Update CI Collect code coverage on CI Dec 24, 2019
@leculver
Copy link
Contributor

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?

@nxtn
Copy link
Contributor Author

nxtn commented Dec 24, 2019

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.

@leculver
Copy link
Contributor

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.

@leculver leculver merged commit 6480630 into microsoft:master Dec 27, 2019
@nxtn nxtn deleted the pipelines branch December 27, 2019 02:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants