Skip to content

Because you thought testing was done when your app compiled.

License

svnscha/cpp-coverage-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🧪 C++ Code Coverage Example (GTest + lcov)

This repository demonstrates how to:

  • Build a C++ project with CMake and GoogleTest
  • Generate code coverage reports using lcov and genhtml
  • Automate everything via GitHub Actions

📦 What’s Inside

  • ✅ Unit tests with GoogleTest
  • ✅ Coverage tracking via --coverage flags
  • ✅ HTML report generation with genhtml
  • ✅ GitHub Actions workflow that:
    • Builds and tests your code
    • Captures and summarizes coverage
    • Uploads an artifact with the HTML report
    • Enforces a minimum coverage threshold (default: 80%)

🚀 Demo

  • Check the open PRs for this repository to see how it works in practice!

About

Because you thought testing was done when your app compiled.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published