PR Pipeline - Code Coverage and Triggers#4360
Conversation
# Conflicts: # eng/pipelines/pr/jobs/test-buildproj-job.yml # eng/pipelines/pr/stages/test-stages.yml
… all tests are first.
There was a problem hiding this comment.
Pull request overview
This PR operationalizes the dedicated Azure DevOps PR validation pipeline by adding GitHub PR triggers, publishing per-job test results as pipeline artifacts, and introducing a post-test stage to merge and publish code coverage (including upload to CodeCov).
Changes:
- Add GitHub PR triggers + path filters to the PR pipeline YAML.
- Publish TRX results (and artifacts containing coverage outputs) from each test job to a consistent pipeline artifact namespace.
- Add a coverage-merge stage that downloads
.coveragefiles, merges to Cobertura, publishes coverage to ADO, and uploads to CodeCov.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 12 comments.
Show a summary per file
| File | Description |
|---|---|
| eng/pipelines/pr/variables/pr-variables.yml | Adds variables for CodeCov token and the shared test-results artifact name. |
| eng/pipelines/pr/steps/publish-test-results-step.yml | New reusable step to publish TRX results and upload the job’s test-results folder as an artifact. |
| eng/pipelines/pr/stages/test-stages.yml | Threads testResultsArtifactName through all PR test jobs. |
| eng/pipelines/pr/stages/collect-coverage-stage.yml | New stage to download coverage artifacts, merge to Cobertura, publish to ADO, and upload to CodeCov. |
| eng/pipelines/pr/pr-pipeline.yml | Adds PR triggers/path filters, centralizes platform matrix as a parameter, and wires in the coverage-collection stage. |
| eng/pipelines/pr/jobs/test-sqlclientmanual-job.yml | Wires test-results publishing into SqlClient manual test jobs. |
| eng/pipelines/pr/jobs/test-buildproj-job.yml | Wires test-results folder routing + publishing into build.proj-driven test jobs. |
paulmedynski
left a comment
There was a problem hiding this comment.
Looking good! A few comments/suggestions.. I thumbs-upped the bot comments I agree with, or replied to them. I also closed a few that I disagreed with.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4360 +/- ##
==========================================
- Coverage 65.69% 63.44% -2.26%
==========================================
Files 285 280 -5
Lines 43311 66193 +22882
==========================================
+ Hits 28453 41994 +13541
- Misses 14858 24199 +9341
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
@paulmedynski I disagree with most of the copilot comments you agreed with, so ... one of us is misunderstanding something 😅 Regarding the CodeCov stuff, I think I need an adult to tell me how they'd like me to address it. |
paulmedynski
left a comment
There was a problem hiding this comment.
All of my feedback has been addressed. There are some bot comments to look into.
Rename testResultsArtifactsName to testResultsArtifactsBaseName Remove codecov uploads Ensure folder exists
* First crack at adding test result publishing to non-manual test jobs. # Conflicts: # eng/pipelines/pr/jobs/test-buildproj-job.yml # eng/pipelines/pr/stages/test-stages.yml * If statement syntax? * Ok forget the if statement. * Version * Unique job names... could be better, but let's start here. * Tree in linux? * Ok forget it, we don't need do emit the tree.... * Wire up test result uploading to sqlclient manual test jobs * Give a test display name to sql manual tests * First attempt at code coverage report publishing * 🤖 Code coverage takes a dynamic dependency on the platforms to ensure all tests are first. * We only need *one* set of parameters * We only need *one* pool name * Add triggers and fix code coverage verbosity thingy * 🤖 fixes for codecov CLI * 👨🦱 and 🤖 comments * 🤖 Use dotnet-tools.json * Comments for general variables Rename testResultsArtifactsName to testResultsArtifactsBaseName Remove codecov uploads Ensure folder exists
Description
This is the last PR before operationalizing the PR pipeline.
Testing
https://dev.azure.com/SqlClientDrivers/ADO.Net/_build/results?buildId=157042&view=results
https://sqlclientdrivers.visualstudio.com/public/_build/results?buildId=157047&view=results
https://dev.azure.com/SqlClientDrivers/ADO.Net/_build/results?buildId=156112&view=results