Skip to content

FEAT: Full Code Coverage & Workflow Integration#238

Merged
bewithgaurav merged 44 commits intomainfrom
bewithgaurav/universal_codecov
Sep 26, 2025
Merged

FEAT: Full Code Coverage & Workflow Integration#238
bewithgaurav merged 44 commits intomainfrom
bewithgaurav/universal_codecov

Conversation

@bewithgaurav
Copy link
Collaborator

@bewithgaurav bewithgaurav commented Sep 17, 2025

Work Item / Issue Reference

AB#38622


Summary

This pull request introduces significant improvements to the PR validation pipeline by adding unified code coverage reporting for both Python and C++ code, enhancing the build process for coverage instrumentation, and optimizing the PR size label automation. The main changes are grouped below:

Pipeline Enhancements:

  • Added a new CodeCoverageReport job to eng/pipelines/pr-validation-pipeline.yml that builds dependencies, runs tests, generates unified coverage reports (Python + C++), and publishes results in both HTML and Cobertura XML formats for Azure DevOps. This includes setup for SQL Server, Python dependencies, and C++ coverage instrumentation.
  • Commented out the old code coverage publishing task in the pipeline to avoid duplicate or incomplete reporting, as the new job supersedes it.

Build and Coverage Tooling:

  • Added a new script generate_codecov.sh to automate installation of coverage tools, run tests, collect and merge Python/C++ coverage data, and produce unified reports.
  • Updated mssql_python/pybind/build.sh to support a coverage build mode (codecov or --coverage), enabling Clang coverage instrumentation for Linux builds and adjusting CMake configuration accordingly. [1] [2]

PR Automation Improvements:

  • Refined the PR size label automation in .github/workflows/pr-format-check.yml to only update labels when necessary, reducing unnecessary label churn and improving logging for better traceability.

Copilot AI review requested due to automatic review settings September 17, 2025 05:46
@github-actions github-actions bot added the pr-size: medium Moderate update size label Sep 17, 2025
Copy link
Contributor

Copilot AI left a comment

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 introduces a comprehensive code coverage solution for the mssql-python project, enabling unified Python and C++ coverage reporting on macOS through GitHub Actions. The implementation adds automated coverage collection, merging, and PR commenting capabilities.

  • Adds a new GitHub Actions workflow for macOS-based unified coverage testing on pull requests
  • Implements a shell script to automate coverage collection, merging Python and C++ coverage data
  • Updates the CMake build configuration to enable Clang coverage instrumentation on macOS

Reviewed Changes

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

File Description
.github/workflows/pr-code-coverage.yml New GitHub Actions workflow for running tests and generating unified coverage reports on macOS
generate_codecov.sh New script to collect, merge, and generate HTML coverage reports from Python and C++ code
mssql_python/pybind/build.sh Updated to include Clang coverage flags for C++ instrumentation on macOS

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@github-actions github-actions bot added pr-size: medium Moderate update size and removed pr-size: medium Moderate update size labels Sep 17, 2025
…ain permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@github-actions github-actions bot added pr-size: medium Moderate update size and removed pr-size: medium Moderate update size labels Sep 17, 2025
@github-actions github-actions bot added pr-size: medium Moderate update size and removed pr-size: medium Moderate update size labels Sep 17, 2025
@github-actions github-actions bot added pr-size: medium Moderate update size and removed pr-size: medium Moderate update size labels Sep 17, 2025
@github-actions github-actions bot added pr-size: medium Moderate update size and removed pr-size: medium Moderate update size labels Sep 17, 2025
@github-actions github-actions bot added pr-size: medium Moderate update size and removed pr-size: medium Moderate update size labels Sep 17, 2025
@github-actions github-actions bot added pr-size: medium Moderate update size and removed pr-size: medium Moderate update size labels Sep 17, 2025
@github-actions github-actions bot removed the pr-size: medium Moderate update size label Sep 17, 2025
@github-actions github-actions bot added pr-size: large Substantial code update and removed pr-size: large Substantial code update labels Sep 19, 2025
@github-actions github-actions bot added pr-size: large Substantial code update and removed pr-size: large Substantial code update labels Sep 19, 2025
@github-actions github-actions bot added pr-size: large Substantial code update and removed pr-size: large Substantial code update labels Sep 19, 2025
@github-actions github-actions bot added pr-size: large Substantial code update and removed pr-size: large Substantial code update labels Sep 19, 2025
@github-actions github-actions bot added pr-size: large Substantial code update and removed pr-size: large Substantial code update labels Sep 19, 2025
@github-actions github-actions bot added pr-size: large Substantial code update and removed pr-size: large Substantial code update labels Sep 19, 2025
@github-actions github-actions bot added pr-size: large Substantial code update and removed pr-size: large Substantial code update labels Sep 19, 2025
@microsoft microsoft deleted a comment from github-actions bot Sep 24, 2025
@microsoft microsoft deleted a comment from github-actions bot Sep 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-size: large Substantial code update

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants