-
Notifications
You must be signed in to change notification settings - Fork 479
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
Add build YAML files for code coverage #3126
Conversation
✔️ No Binary Compatibility issues for Microsoft.Bot.Builder.dll compared against version 4.6.3 |
✔️ No Binary Compatibility issues for Microsoft.Bot.Builder.dll compared against version 4.6.3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggest dropping the code coverage steps into a .yml file, then adding that file as a template to any builds that need coverage. Here is an example of that pattern.
configuration: '$(BuildConfiguration)' | ||
|
||
- powershell: | | ||
coverlet Adapters\$(ProjectName)\bin\$(BuildConfiguration)\netcoreapp3.0\$(ProjectName).dll --target "dotnet" --targetargs "test Adapters\$(ProjectName)\$(ProjectName).csproj -v n --configuration debug --no-build --no-restore --filter TestCategory!=IgnoreInAutomatedBuild" --format cobertura --output $(Build.SourcesDirectory)\$(OutputFile) --exclude-by-file "Adapters\$env:ProjectName\TwilioClientWrapper.cs" --exclude-by-file "Adapters\$env:ProjectName\TwilioMessage.cs" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider using the filter '--filter "TestCategory!=IgnoreInAutomatedBuild&TestCategory!=FunctionalTests"'.
build/yaml/build-code-coverage.yml
Outdated
projects: | | ||
**/Adapters/Microsoft.Bot.Builder.Adapters.Webex.Tests/Microsoft.Bot.Builder.Adapters.Webex.Tests.csproj | ||
|
||
arguments: '-v n --configuration $(BuildConfiguration) --no-build --no-restore --filter TestCategory!=IgnoreInAutomatedBuild /p:CollectCoverage=true /p:MergeWith=$(System.DefaultWorkingDirectory)/$(CovereletOutputFile) /p:CoverletOutputFormat=cobertura /p:CoverletOutput=$(System.DefaultWorkingDirectory)/final.xml' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider using the filter '--filter "TestCategory!=IgnoreInAutomatedBuild&TestCategory!=FunctionalTests"'.
Can you sync w/ @BruceHaley to get this finalized and merged? |
Sure @cleemullins, we'll do that and let you know the progress. Thanks! |
✔️ No Binary Compatibility issues for Microsoft.Bot.Builder.dll compared against version 4.6.3 |
IS this PR all done? Do we have proper code coverage all setup and done? |
@cleemullins we are reviewing all the PRs to be sure that everything it's ok. We found on this one that the YAML file is pointing to the Twilio Project only, so we are working on solving this to have it ready ASAP. |
Description
This pull request adds YAML files to set up build pipelines for code coverage.
Specific Changes
We added two YAML files inside the folder
build-CI-yaml
in the root folder.The added files are:
build-code-coverage-w-coverlet.yml
code-coverage-w-coverlet-steps.yml
How to use
The next steps will guide you through the configuration of a Build pipeline based on the YAML file.
Set up build pipeline
1- Create a pipeline using the classic editor, this option allows us to select the YAML file to configure the pipeline.
2- Configure the repository and branch.
3- In the Configuration as code, select the YAML option.
4- In section YAML, write the build name and select the build YAML file inside the folder
build-CI-yaml
in the root of the directory.5- Hit Save & Queue, select the branch you want to use to run the build and click Save and Run
Testing
In the image below, you can see the pipelines running using these YAML files to set them up.