Skip to content
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

ci: add code coverage publishing and check to pipeline #3544

Merged
merged 7 commits into from
Apr 4, 2025

Conversation

QxBytes
Copy link
Contributor

@QxBytes QxBytes commented Mar 31, 2025

Reason for Change:

The current pr pipeline does not check if a PR drastically decreases the code coverage of the repository, nor does it publish code coverage results to the code coverage tab in ADO. This PR enables publishing code coverage and should mark the build as a failure if the code coverage decreases by a significant amount (> 0.25% I believe) compared to the master branch. Merges code coverage between windows and linux oses.

Issue Fixed:

See above

Requirements:

Notes:

@QxBytes QxBytes added the ci Infra or tooling. label Mar 31, 2025
@QxBytes QxBytes self-assigned this Mar 31, 2025
@QxBytes
Copy link
Contributor Author

QxBytes commented Apr 1, 2025

/azp run Azure Container Networking PR

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@QxBytes QxBytes marked this pull request as ready for review April 2, 2025 18:52
@Copilot Copilot bot review requested due to automatic review settings April 2, 2025 18:52
@QxBytes QxBytes requested a review from a team as a code owner April 2, 2025 18:52
@QxBytes QxBytes requested a review from thomasricci April 2, 2025 18:52
Copy link
Contributor

@Copilot 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 enhances the CI pipeline by adding code coverage publishing and regression checks to ensure that new changes do not significantly decrease overall test coverage.

  • Adds "set -e" to enforce early failure on errors during testing
  • Creates symlinks for gocov and gocov-xml and generates coverage reports
  • Publishes the coverage report and adds a coverage regression check step
Files not reviewed (1)
  • Makefile: Language not supported
Comments suppressed due to low confidence (1)

.pipelines/templates/run-unit-tests.yaml:23

  • The line with '{ { { {' appears to be stray text that may have been accidentally committed. Consider removing it to ensure the script executes as intended.
                { { { {

@QxBytes QxBytes force-pushed the alew/ut-coverage branch from 187e25c to 3f6bedd Compare April 2, 2025 19:03
@QxBytes
Copy link
Contributor Author

QxBytes commented Apr 2, 2025

/azp run Azure Container Networking PR

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@QxBytes QxBytes requested a review from Copilot April 2, 2025 19:05
Copy link
Contributor

@Copilot 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 enhances the CI pipeline by adding steps to publish and check code coverage, ensuring that any significant regressions in code coverage are flagged. Key changes include:

  • Adding a "set -e" command to catch script failures.
  • Adding new steps for generating and publishing the coverage report.
  • Introducing a build quality check task for verifying code coverage regressions.
Files not reviewed (1)
  • Makefile: Language not supported

@QxBytes
Copy link
Contributor Author

QxBytes commented Apr 3, 2025

/azp run Azure Container Networking PR

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@QxBytes
Copy link
Contributor Author

QxBytes commented Apr 3, 2025

/azp run Azure Container Networking PR

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@QxBytes QxBytes added this pull request to the merge queue Apr 3, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Apr 3, 2025
@QxBytes QxBytes added this pull request to the merge queue Apr 3, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Apr 4, 2025
@QxBytes QxBytes added this pull request to the merge queue Apr 4, 2025
Merged via the queue into master with commit e32e2b8 Apr 4, 2025
15 checks passed
@QxBytes QxBytes deleted the alew/ut-coverage branch April 4, 2025 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci Infra or tooling.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants