{"id":27180121,"url":"https://github.com/jmarrec/testcpp-gha-coverage","last_synced_at":"2025-04-09T14:25:39.406Z","repository":{"id":47349807,"uuid":"401486983","full_name":"jmarrec/TestCpp-GHA-Coverage","owner":"jmarrec","description":"A repo to test how to report coverage of a C++ project using Github Actions","archived":false,"fork":false,"pushed_at":"2023-06-29T13:12:20.000Z","size":127,"stargazers_count":6,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-06-11T16:07:38.755Z","etag":null,"topics":["coverage","cpp","github-actions","tutorial"],"latest_commit_sha":null,"homepage":"","language":"CMake","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jmarrec.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-08-30T21:09:44.000Z","updated_at":"2024-06-11T16:07:38.756Z","dependencies_parsed_at":"2022-09-08T08:00:48.087Z","dependency_job_id":null,"html_url":"https://github.com/jmarrec/TestCpp-GHA-Coverage","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmarrec%2FTestCpp-GHA-Coverage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmarrec%2FTestCpp-GHA-Coverage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmarrec%2FTestCpp-GHA-Coverage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmarrec%2FTestCpp-GHA-Coverage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jmarrec","download_url":"https://codeload.github.com/jmarrec/TestCpp-GHA-Coverage/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248054526,"owners_count":21040020,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["coverage","cpp","github-actions","tutorial"],"created_at":"2025-04-09T14:25:38.803Z","updated_at":"2025-04-09T14:25:39.397Z","avatar_url":"https://github.com/jmarrec.png","language":"CMake","readme":"# TestCpp-GHA-Coverage\n\n[![C++ CI](https://github.com/jmarrec/TestCpp-GHA-Coverage/actions/workflows/build.yml/badge.svg)](https://github.com/jmarrec/TestCpp-GHA-Coverage/actions/workflows/build.yml)\n[![codecov](https://codecov.io/gh/jmarrec/TestCpp-GHA-Coverage/branch/main/graph/badge.svg?token=CZCY313ERT)](https://codecov.io/gh/jmarrec/TestCpp-GHA-Coverage)\n[![clang-format](https://github.com/jmarrec/TestCpp-GHA-Coverage/actions/workflows/clang-format-check.yml/badge.svg)](https://github.com/jmarrec/TestCpp-GHA-Coverage/actions/workflows/clang-format-check.yml)\n[![cppcheck](https://github.com/jmarrec/TestCpp-GHA-Coverage/actions/workflows/cppcheck.yml/badge.svg)](https://github.com/jmarrec/TestCpp-GHA-Coverage/actions/workflows/cppcheck.yml)\n\nA repo to test how to report coverage of a C++ project using Github Actions, using https://codecov.io.\n\nSee:\n* Example PRs [increasing](https://github.com/jmarrec/TestCpp-GHA-Coverage/pull/1) and [decreasing](https://github.com/jmarrec/TestCpp-GHA-Coverage/pull/2) coverage\n* the Github Actions workflow at [.github/workflows/build.yml](.github/workflows/build.yml)\n\n----\n\n## Additional\n\nAdditionally, it includes a [cppcheck action](.github/workflows/cppcheck.yml) with a custom python script ([ci/colorize_cppcheck_results.py](./ci/colorize_cppcheck_results.py)) I created that will print a summary of offenses and add color to your action.\n\n![cppcheck](./docs/cppcheck.png)\n\nThere is also a [clang-format action](.github/workflows/clang-format-check.yml) that uses the `.clang-format` file in the repo.\n\n(Note: A `.clang-tidy` file is also provided, but I didn't bother adding an action for that.)\n\n## Multi platform support\n\n`Person.cpp` has a few compiler specific macros, so that we can test merging reports from several platforms on codecov. See [src/Person.cpp#L18-L27](https://github.com/jmarrec/TestCpp-GHA-Coverage/blob/408d98bb68b05222006d052dd6367090827ed8fc/src/Person.cpp#L18-L27)\n\n\nSee [PR#5](https://github.com/jmarrec/TestCpp-GHA-Coverage/pull/5) for more info including before/after screenshots when I added Mac in addition to Ubuntu\n\n![Mac+Ubuntu](https://user-images.githubusercontent.com/5479063/131817697-44e8ac87-577e-4531-9bf5-fd05a07bba28.png)\n\n\nSee [PR#6](https://github.com/jmarrec/TestCpp-GHA-Coverage/pull/6) when I added Windows (via OpenCppCoverage) in addition to Mac and Ubuntu. **Looks like Windows's report don't merge correctly to codecov?**\n\n![image](https://user-images.githubusercontent.com/5479063/131827053-6bff2bdf-ed92-4ddc-aa5a-efcaed3c3220.png)\n\n**Note: Looks like there is a viewing problem where the clang line is no longer green, yet report is correctly at 100%**\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjmarrec%2Ftestcpp-gha-coverage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjmarrec%2Ftestcpp-gha-coverage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjmarrec%2Ftestcpp-gha-coverage/lists"}