Skip to content

Speed up Code Coverage Jobs#3907

Merged
paulmedynski merged 21 commits into
mainfrom
dev/paul/duplicate-runs
Feb 17, 2026
Merged

Speed up Code Coverage Jobs#3907
paulmedynski merged 21 commits into
mainfrom
dev/paul/duplicate-runs

Conversation

@paulmedynski

@paulmedynski paulmedynski commented Jan 21, 2026

Copy link
Copy Markdown
Contributor

Description

The code coverage pipeline job is inefficient, and can be greatly streamlined. We don't need to publish separate uploads to CodeCov for MDS .NET, .NET Framework, and AKV.

Testing

  • PR runs will validate the new consolidation steps.
  • I will manually verify the Azure DevOps test results and coverage, and CodeCov reports.

@paulmedynski paulmedynski requested a review from a team as a code owner January 21, 2026 15:58
Copilot AI review requested due to automatic review settings January 21, 2026 15:58
@paulmedynski paulmedynski added Area\Tests Issues that are targeted to tests or test projects Area\Engineering Use this for issues that are targeted for changes in the 'eng' folder or build systems. labels Jan 21, 2026
@github-project-automation github-project-automation Bot moved this to To triage in SqlClient Board Jan 21, 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 pull request optimizes CI/CD pipeline execution by separating unit and integration tests to reduce redundant test execution. The PR introduces a testType parameter that controls which test suites run in different pipeline contexts.

Changes:

  • Added testType parameter ('All', 'Unit', or 'Integration') to pipeline templates
  • Modified PR pipelines to run only relevant test suites (Unit tests in Project builds, Integration tests in Package builds)
  • Updated test execution conditionals to respect the new testType parameter

Reviewed changes

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

Show a summary per file
File Description
eng/pipelines/sqlclient-pr-project-ref-pipeline.yml Sets testType to 'Unit' for project reference builds, restricting to unit and functional tests
eng/pipelines/sqlclient-pr-package-ref-pipeline.yml Sets testType to 'Integration' for package reference builds, restricting to manual tests
eng/pipelines/dotnet-sqlclient-ci-core.yml Defines testType parameter with default 'All' for CI pipelines to continue running all tests
eng/pipelines/common/templates/steps/run-all-tests-step.yml Implements conditional test execution based on testType parameter
eng/pipelines/common/templates/stages/ci-run-tests-stage.yml Propagates testType parameter through stage template
eng/pipelines/common/templates/jobs/ci-run-tests-job.yml Propagates testType parameter through job template

Comment thread eng/pipelines/common/templates/stages/ci-run-tests-stage.yml Outdated
Comment thread eng/pipelines/common/templates/steps/run-all-tests-step.yml Outdated
Comment thread eng/pipelines/common/templates/jobs/ci-run-tests-job.yml Outdated
@codecov

codecov Bot commented Jan 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 0.00%. Comparing base (a68e00f) to head (5d2d5f4).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #3907       +/-   ##
==========================================
- Coverage   75.22%       0   -75.23%     
==========================================
  Files         266       0      -266     
  Lines       42932       0    -42932     
==========================================
- Hits        32294       0    -32294     
+ Misses      10638       0    -10638     
Flag Coverage Δ
addons ?
netcore ?
netfx ?

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

☔ View full report in Codecov by Sentry.
📢 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 previously approved these changes Jan 21, 2026

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

Overall, probably a good change. The main issue I have right now is the lumping of functional tests with unit tests. My understanding of them were that they were not unit tests in theory, they were just the simple integration tests that validate they do the most basic stuff. As it turns out a lot of those are unit tests, but not the majority. I was working on the side a bit to move the unit tests from the functional tests and into the unit test project. Ultimately I think we're aligned that we want: unit test, local integration test, remote integration test, stress test, and fuzz test projects. And this change is kinda orthogonal to those goals, without getting in the way of them. So go for it 😆

I think another low-ish hanging fruit is to separate the unit tests and functional tests as separate jobs, like the test sets. That way we don't need to repeat unit and functional tests four times for each platform. They're fast, yes, but not instantaneous, and I imagine we could shave a decent amount of time off a build doing it.

@benrr101 benrr101 moved this from To triage to In review in SqlClient Board Jan 21, 2026
@paulmedynski

Copy link
Copy Markdown
Contributor Author

You're correct on all counts. I chose to combine the running of Unit and Functional tests because they're mostly unit with some local integration sprinkled in, but mainly because their combined run time is close to the Manual ones. This gives us the most bang-for-the-buck in terms of speeding up the PR runs right now.

We also shouldn't be running Unit and Functional tests in any of the Azure SQL configurations - another future optimization.

Comment thread eng/pipelines/dotnet-sqlclient-ci-core.yml Outdated
Copilot AI review requested due to automatic review settings January 22, 2026 00:29

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 7 out of 7 changed files in this pull request and generated 2 comments.

Comment thread eng/pipelines/dotnet-sqlclient-ci-core.yml Outdated
Comment thread eng/pipelines/dotnet-sqlclient-ci-core.yml Outdated
@priyankatiwari08 priyankatiwari08 self-assigned this Jan 22, 2026

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

Looks good to me. Manual tests in itself takes quite significant amount of time to run. So, this segregation should help us in longer run.

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 7 out of 7 changed files in this pull request and generated 2 comments.

Comment thread eng/pipelines/sqlclient-pr-project-ref-pipeline.yml Outdated
Comment thread eng/pipelines/sqlclient-pr-project-ref-pipeline.yml Outdated
apoorvdeshmukh
apoorvdeshmukh previously approved these changes Jan 23, 2026
  - Project runs will perform unit tests (i.e. MDS Unit and Functional suites).
  - Package runs will perform integration tests (i.e. MDS Manual suite).

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 7 out of 7 changed files in this pull request and generated no new comments.

@paulmedynski paulmedynski moved this from In progress to In review in SqlClient Board Jan 29, 2026
@paulmedynski paulmedynski marked this pull request as ready for review January 29, 2026 21:04
Copilot AI review requested due to automatic review settings January 29, 2026 21:04

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 25 out of 25 changed files in this pull request and generated 1 comment.

Comment thread eng/pipelines/common/templates/jobs/ci-code-coverage-job.yml
cheenamalhotra
cheenamalhotra previously approved these changes Jan 29, 2026
Copilot AI review requested due to automatic review settings February 10, 2026 17:49

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 18 out of 21 changed files in this pull request and generated 5 comments.

Comment thread eng/pipelines/common/templates/stages/ci-run-tests-stage.yml
Comment thread eng/pipelines/common/templates/jobs/ci-code-coverage-job.yml
Comment thread build.proj Outdated
Comment thread eng/pipelines/common/templates/steps/run-all-tests-step.yml
Comment thread eng/pipelines/common/templates/steps/run-all-tests-step.yml
apoorvdeshmukh
apoorvdeshmukh previously approved these changes Feb 13, 2026
mdaigle
mdaigle previously approved these changes Feb 13, 2026
Copilot AI review requested due to automatic review settings February 13, 2026 21:44
@mdaigle mdaigle dismissed stale reviews from apoorvdeshmukh and themself via 5d2d5f4 February 13, 2026 21:44

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 21 out of 24 changed files in this pull request and generated no new comments.

@paulmedynski paulmedynski merged commit f322be6 into main Feb 17, 2026
301 checks passed
@github-project-automation github-project-automation Bot moved this from In review to Done in SqlClient Board Feb 17, 2026
@paulmedynski paulmedynski deleted the dev/paul/duplicate-runs branch February 17, 2026 13:04
@mdaigle mdaigle added this to the 7.0.0-preview4 milestone Mar 5, 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. Area\Tests Issues that are targeted to tests or test projects

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

7 participants