Skip to content

Comments

Add comprehensive code coverage infrastructure#436

Open
yashrajsapra wants to merge 4 commits intomainfrom
claude/add-code-coverage-017ysUVboVBGpZx4zd924eVx
Open

Add comprehensive code coverage infrastructure#436
yashrajsapra wants to merge 4 commits intomainfrom
claude/add-code-coverage-017ysUVboVBGpZx4zd924eVx

Conversation

@yashrajsapra
Copy link
Collaborator

This commit adds complete code coverage support to ApraPipes with automatic CI/CD integration and local development tools.

New Features:

  • CMake code coverage module with gcov/lcov integration
  • Automated coverage generation on every push/PR via GitHub Actions
  • Local coverage generation script for developers
  • Codecov.io integration for coverage tracking and trending
  • Coverage badges in README
  • Comprehensive documentation

Files Added:

  • cmake/CodeCoverage.cmake: CMake module for coverage configuration
  • .github/workflows/code-coverage.yml: CI workflow for automated coverage
  • generate_coverage.sh: Local coverage generation script
  • codecov.yml: Codecov service configuration
  • docs/CODE_COVERAGE.md: Complete user documentation
  • COVERAGE_SETUP.md: Quick reference guide

Files Modified:

  • base/CMakeLists.txt: Added CODE_COVERAGE option and coverage target
  • README.md: Added coverage section with badges and quick links

Usage:
Local: ./generate_coverage.sh CI: Automatic on push/PR Target: make coverage (in build directory)

Configuration:

  • Coverage excludes: tests, third-party, system libraries
  • Target coverage: 70% line coverage
  • Reports: HTML + lcov format
  • Uploads to Codecov for tracking

Benefits:

  • Visibility into test coverage
  • Automated coverage reporting
  • Easy local coverage generation
  • Coverage trends over time
  • PR coverage diffs

To enable Codecov integration:

  1. Visit https://codecov.io
  2. Connect repository
  3. Add CODECOV_TOKEN to GitHub secrets

See docs/CODE_COVERAGE.md for complete documentation.

IMPORTANT: All PRs must be linked to an issue (except for extremely trivial and straightforward changes).

Fixes #[Issue]

Description

Precise description of the changes in this pull request

Alternative(s) considered

Have you considered any alternatives? And if so, why have you chosen the approach in this PR?

Type

Type Choose one: (Bug fix | Feature | Documentation | Testing | Other)

Screenshots (if applicable)

Checklist

  • I have read the Contribution Guidelines
  • I have written Unit Tests
  • I have discussed my proposed solution with code owners in the linked issue(s) and we have agreed upon the general approach

This commit adds complete code coverage support to ApraPipes with automatic
CI/CD integration and local development tools.

New Features:
- CMake code coverage module with gcov/lcov integration
- Automated coverage generation on every push/PR via GitHub Actions
- Local coverage generation script for developers
- Codecov.io integration for coverage tracking and trending
- Coverage badges in README
- Comprehensive documentation

Files Added:
- cmake/CodeCoverage.cmake: CMake module for coverage configuration
- .github/workflows/code-coverage.yml: CI workflow for automated coverage
- generate_coverage.sh: Local coverage generation script
- codecov.yml: Codecov service configuration
- docs/CODE_COVERAGE.md: Complete user documentation
- COVERAGE_SETUP.md: Quick reference guide

Files Modified:
- base/CMakeLists.txt: Added CODE_COVERAGE option and coverage target
- README.md: Added coverage section with badges and quick links

Usage:
  Local: ./generate_coverage.sh
  CI: Automatic on push/PR
  Target: make coverage (in build directory)

Configuration:
- Coverage excludes: tests, third-party, system libraries
- Target coverage: 70% line coverage
- Reports: HTML + lcov format
- Uploads to Codecov for tracking

Benefits:
- Visibility into test coverage
- Automated coverage reporting
- Easy local coverage generation
- Coverage trends over time
- PR coverage diffs

To enable Codecov integration:
1. Visit https://codecov.io
2. Connect repository
3. Add CODECOV_TOKEN to GitHub secrets

See docs/CODE_COVERAGE.md for complete documentation.
@github-actions
Copy link
Contributor

github-actions bot commented Nov 26, 2025

Test Results Linux

  1 files  ±0    1 suites  ±0   10m 16s ⏱️ -1s
319 tests ±0  231 ✅ ±0  83 💤 ±0  5 ❌ ±0 
236 runs  ±0  148 ✅ ±0  83 💤 ±0  5 ❌ ±0 

For more details on these failures, see this check.

Results for commit f3ff6b2. ± Comparison against base commit 8933502.

♻️ This comment has been updated with latest results.

yashrajsapra and others added 3 commits November 26, 2025 18:06
- Update actions/upload-artifact from v3 to v4
- Pin CMake version to 3.29.6 for consistency
- Fixes workflow failure due to deprecated artifact action
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