forked from Azure/iotedge
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use 1ES-hosted pools in .NET Core checkin pipeline (Azure#6655)
Ubuntu 18.04 MS-hosted agents in Azure Pipelines will soon be deprecated. The original intent of this change was to convert our .NET checkin pipeline from MS-hosted agents to 1ES-agents, which it does. However, rather than converting the Windows MS-hosted agent used for code coverage to a _Windows_ 1ES-hosted agent, I decided to update our code coverage job to work on a Linux 1ES-hosted agent, since our latest versions of IoT Edge don't directly target Windows. This ended up being a larger change, and includes: - Updating our code coverage .runsettings file to use configuration settings supported by Coverlet ([doc](https://github.com/coverlet-coverage/coverlet/blob/1f1a10143517da4e7b48b50caf16b407abe5a233/Documentation/VSTestIntegration.mdhttps://github.com/coverlet-coverage/coverlet/blob/1f1a10143517da4e7b48b50caf16b407abe5a233/Documentation/VSTestIntegration.md)) - Replacing verbose Bash@3 task syntax to the shortcut "script" syntax for readability - Changing from the Windows-only "code coverage" collector to the "xplat code coverage" collector (which uses Coverlet) - Switching from line coverage to branch coverage because it's supposed to be a more accurate metric per some documentation I read - Reducing the coverage goal to 50%. As near as I can tell, the new code coverage run is measuring the same assemblies as the old run, but due to differences in how it measures and the switch to branch coverage, the resulting number is about 15% lower. We can address gaps in coverage with other PRs. - Updating to a newer version of the Microsoft.NET.Test.Sdk, Moq, and xunit* dependencies in our tests, which fixed a problem I was seeing with Coverlet - Adding Coverlet as a dependency to all unit test projects - Fixing some xunit compile errors resulting from the updated xunit version - Building Microsoft.Azure.Devices.Edge.Util.Test.Common as a library instead of an app, so that xunit doesn't look for unit tests in that assembly - Installing another package (needed by rocksdb unit tests) in installPrereqs.sh One benefit of the switch to Coverlet/Cobertura is that we get a nice, formatted report in the Code Coverage tag in the pipeline UI! _Note_: due to some reformatting in dotnet-checkin.yaml, it will be easier to review the changes there if you hide whitespace. ## Azure IoT Edge PR checklist:
- Loading branch information
1 parent
d796a36
commit aa82555
Showing
46 changed files
with
265 additions
and
352 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.