Skip to content

PR Pipeline - Code Coverage and Triggers#4360

Open
benrr101 wants to merge 18 commits into
mainfrom
dev/russellben/pr-code-coverage
Open

PR Pipeline - Code Coverage and Triggers#4360
benrr101 wants to merge 18 commits into
mainfrom
dev/russellben/pr-code-coverage

Conversation

@benrr101

@benrr101 benrr101 commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Description

This is the last PR before operationalizing the PR pipeline.

  • PR triggers are added for the pipeline - copy/pasted from the existing PR pipeline
  • Code coverage stage is added that publishes test results and code coverage results
    • This required some reworking of the code to populate platforms as parameters to the pipeline. It is recommended not to touch these if you manually run the pipeline :)

Testing

@benrr101 benrr101 added this to the 7.1.0-preview2 milestone Jun 11, 2026
@benrr101 benrr101 requested a review from a team as a code owner June 11, 2026 22:17
Copilot AI review requested due to automatic review settings June 11, 2026 22:17
@benrr101 benrr101 added the Area\Engineering Use this for issues that are targeted for changes in the 'eng' folder or build systems. label Jun 11, 2026
@github-project-automation github-project-automation Bot moved this to To triage in SqlClient Board Jun 11, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 .coverage files, 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.

Comment thread eng/pipelines/pr/steps/publish-test-results-step.yml
Comment thread eng/pipelines/pr/jobs/test-buildproj-job.yml
Comment thread eng/pipelines/pr/jobs/test-buildproj-job.yml
Comment thread eng/pipelines/pr/jobs/test-sqlclientmanual-job.yml
Comment thread eng/pipelines/pr/stages/collect-coverage-stage.yml Outdated
Comment thread eng/pipelines/pr/stages/collect-coverage-stage.yml
Comment thread eng/pipelines/pr/stages/collect-coverage-stage.yml Outdated
Comment thread eng/pipelines/pr/stages/collect-coverage-stage.yml Outdated
Comment thread eng/pipelines/pr/sqlclient-pr-pipeline.yml
Comment thread eng/pipelines/pr/sqlclient-pr-pipeline.yml
@benrr101 benrr101 moved this from To triage to In review in SqlClient Board Jun 12, 2026

@paulmedynski paulmedynski left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread eng/pipelines/pr/stages/collect-coverage-stage.yml Outdated
Comment thread eng/pipelines/pr/steps/publish-test-results-step.yml
Comment thread eng/pipelines/pr/variables/pr-variables.yml Outdated
Comment thread eng/pipelines/pr/pr-pipeline.yml Outdated
Comment thread eng/pipelines/pr/pr-pipeline.yml Outdated
Comment thread eng/pipelines/pr/sqlclient-pr-pipeline.yml
Comment thread eng/pipelines/pr/sqlclient-pr-pipeline.yml
@github-project-automation github-project-automation Bot moved this from In review to Waiting for customer in SqlClient Board Jun 12, 2026
@codecov

codecov Bot commented Jun 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 63.44%. Comparing base (fd8cb4b) to head (f213eaa).
⚠️ Report is 11 commits behind head on main.

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     
Flag Coverage Δ
CI-SqlClient ?
PR-SqlClient-Project 63.44% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@benrr101 benrr101 moved this from Waiting for customer to In review in SqlClient Board Jun 12, 2026
@benrr101 benrr101 requested a review from paulmedynski June 12, 2026 18:34
@benrr101

benrr101 commented Jun 12, 2026

Copy link
Copy Markdown
Contributor Author

@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.

Copilot AI review requested due to automatic review settings June 12, 2026 19:06

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.

Comment thread eng/pipelines/pr/steps/publish-test-results-step.yml
Comment thread eng/pipelines/pr/stages/collect-coverage-stage.yml Outdated
Comment thread eng/pipelines/pr/stages/collect-coverage-stage.yml Outdated

@paulmedynski paulmedynski left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All of my feedback has been addressed. There are some bot comments to look into.

@github-project-automation github-project-automation Bot moved this from In review to Waiting for customer in SqlClient Board Jun 16, 2026
Comment thread eng/pipelines/pr/jobs/test-buildproj-job.yml
Comment thread eng/pipelines/pr/stages/collect-coverage-stage.yml
Comment thread eng/pipelines/pr/steps/publish-test-results-step.yml
Comment thread eng/pipelines/pr/variables/pr-variables.yml
Comment thread eng/pipelines/pr/sqlclient-pr-pipeline.yml
Comment thread eng/pipelines/pr/stages/collect-coverage-stage.yml Outdated
Rename testResultsArtifactsName to testResultsArtifactsBaseName
Remove codecov uploads
Ensure folder exists
@benrr101 benrr101 moved this from Waiting for customer to In review in SqlClient Board Jun 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area\Engineering Use this for issues that are targeted for changes in the 'eng' folder or build systems.

Projects

Status: In review

Development

Successfully merging this pull request may close these issues.

5 participants