Skip to content

Conversation

@senthilku
Copy link
Contributor

Summary

Enabling project coverage and patch coverage for PR's

Testing

CI/CD

@senthilku senthilku requested review from a team and Copilot July 30, 2025 14:06
@senthilku senthilku marked this pull request as draft July 30, 2025 14:06
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 enables coverage report generation and upload for unit tests by integrating Codecov for project and patch coverage tracking.

  • Adds XML coverage report generation capability alongside existing HTML reports
  • Integrates Codecov upload step in the CI/CD workflow with coverage requirements
  • Configures Codecov with 60% patch coverage target and project coverage monitoring

Reviewed Changes

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

File Description
scripts/build_coverage.sh Adds gcovr installation and XML coverage generation with --xml flag
.github/workflows/unit_integration_test.yaml Enables coverage build flags and adds Codecov upload step
.github/codecov.yml Configures Codecov with project and patch coverage requirements
Comments suppressed due to low confidence (1)

scripts/build_coverage.sh:44

  • The gcovr version 8.3 may not exist. As of my knowledge cutoff in January 2025, gcovr's latest version was around 6.x. Please verify this version exists or use a known stable version.
        pip3 install gcovr==8.3

if_ci_failed: ignore
patch:
default:
target: 60% # Require 80% patch coverage
Copy link

Copilot AI Jul 30, 2025

Choose a reason for hiding this comment

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

The comment says 'Require 80% patch coverage' but the target is set to 60%. The comment should be updated to match the actual target value.

Suggested change
target: 60% # Require 80% patch coverage
target: 60% # Require 60% patch coverage

Copilot uses AI. Check for mistakes.
Comment on lines +41 to +47
_install_gcovr() {
if ! gcovr --version >/dev/null 2>&1; then
echo "gcovr not installed. Installing..."
pip3 install gcovr==8.3
fi
}

Copy link

Copilot AI Jul 30, 2025

Choose a reason for hiding this comment

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

[nitpick] The _install_gcovr function should be called after its definition. Currently it's defined but never invoked until line 298, which could lead to confusion about when gcovr gets installed.

Suggested change
_install_gcovr() {
if ! gcovr --version >/dev/null 2>&1; then
echo "gcovr not installed. Installing..."
pip3 install gcovr==8.3
fi
}
# _install_gcovr invocation moved closer to its definition for clarity.() {
if ! gcovr --version >/dev/null 2>&1; then
echo "gcovr not installed. Installing..."
pip3 install gcovr==8.3
fi
}
_install_gcovr

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants