{"id":14985970,"url":"https://github.com/irongut/codecoveragesummary","last_synced_at":"2025-04-08T09:10:23.541Z","repository":{"id":37166702,"uuid":"357002765","full_name":"irongut/CodeCoverageSummary","owner":"irongut","description":"A GitHub Action that reads Cobertura format code coverage files and outputs a text or markdown summary.","archived":false,"fork":false,"pushed_at":"2025-03-11T23:12:46.000Z","size":176,"stargazers_count":216,"open_issues_count":20,"forks_count":58,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-07T20:42:31.998Z","etag":null,"topics":["action","cobertura","code-coverage","coverage","coverlet","github-actions","test-coverage"],"latest_commit_sha":null,"homepage":"","language":"C#","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/irongut.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["irongut"]}},"created_at":"2021-04-11T23:28:19.000Z","updated_at":"2025-04-07T08:20:32.000Z","dependencies_parsed_at":"2024-04-18T00:35:12.819Z","dependency_job_id":"4cbc7b83-cb0a-47df-84ad-979b5002c705","html_url":"https://github.com/irongut/CodeCoverageSummary","commit_stats":{"total_commits":164,"total_committers":5,"mean_commits":32.8,"dds":0.2195121951219512,"last_synced_commit":"f13848964841ca2f7a63343b287493e17dc645de"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/irongut%2FCodeCoverageSummary","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/irongut%2FCodeCoverageSummary/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/irongut%2FCodeCoverageSummary/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/irongut%2FCodeCoverageSummary/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/irongut","download_url":"https://codeload.github.com/irongut/CodeCoverageSummary/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247809964,"owners_count":20999816,"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":["action","cobertura","code-coverage","coverage","coverlet","github-actions","test-coverage"],"created_at":"2024-09-24T14:12:03.771Z","updated_at":"2025-04-08T09:10:23.477Z","avatar_url":"https://github.com/irongut.png","language":"C#","funding_links":["https://github.com/sponsors/irongut"],"categories":[],"sub_categories":[],"readme":"# Code Coverage Summary\n\n\u003cdiv align=\"center\"\u003e\n\n![.NET 6.0](https://img.shields.io/badge/Version-.NET%206.0-informational?style=flat\u0026logo=dotnet)\n\u0026nbsp;\n![Built With Docker](https://img.shields.io/badge/Built_With-Docker-informational?style=flat\u0026logo=docker)\n\u0026nbsp;\n[![OpenSSF Best Practices](https://bestpractices.coreinfrastructure.org/projects/6292/badge)](https://bestpractices.coreinfrastructure.org/projects/6292)\n\u0026nbsp;\n[![CI Build](https://github.com/irongut/CodeCoverageSummary/actions/workflows/ci-build.yml/badge.svg)](https://github.com/irongut/CodeCoverageSummary/actions/workflows/ci-build.yml)\n\u0026nbsp;\n[![CodeQL Scan](https://github.com/irongut/CodeCoverageSummary/actions/workflows/codeql-scan.yml/badge.svg)](https://github.com/irongut/CodeCoverageSummary/actions/workflows/codeql-scan.yml)\n\n\u003c/div\u003e\n\nA GitHub Action that reads Cobertura format code coverage files from your test suite and outputs a text or markdown summary. This summary can be posted as a Pull Request comment or included in Release Notes by other actions to give you an immediate insight into the health of your code without using a third-party site.\n\nCode Coverage Summary is designed for use with any test framework that outputs coverage in Cobertura XML format including [Coverlet](https://github.com/coverlet-coverage/coverlet), [gcovr](https://github.com/gcovr/gcovr), [simplecov](https://github.com/simplecov-ruby/simplecov) and [MATLAB](https://uk.mathworks.com/help/matlab/ref/matlab.unittest.plugins.codecoverageplugin-class.html). See the [FAQ](https://github.com/irongut/CodeCoverageSummary/wiki/Frequently-Asked-Questions#which-testing-tools-does-ccs-work-with) for more details. If it doesn't work with your tooling please [open an issue][new-issue] to discuss the problem.\n\nCode Coverage Summary is compatible with [StepSecurity Secure Workflows](https://github.com/step-security/secure-workflows) and uses a Docker image that is cryptographically signed using [Sigstore](https://www.sigstore.dev/). For instructions how to verify the Docker image please see the [Wiki](https://github.com/irongut/CodeCoverageSummary/wiki/Verify-the-Docker-Image).\n\n**As a Docker based action Code Coverage Summary requires a Linux runner.**\n\n\n## Inputs\n\n### `filename`\n**Required**\n\nA comma separated list of code coverage files to analyse. Also supports using glob patterns to match multiple files. If there are any spaces in a path or filename this value must be in quotes.\n\n\n### `badge`\n\nInclude a badge reporting the Line Rate coverage in the output using [shields.io](https://shields.io/) - `true` or `false` (default).\n\nLine Rate | Badge\n--------- | -----\nless than lower threshold (50%) | ![Code Coverage](https://img.shields.io/badge/Code%20Coverage-45%25-critical?style=flat)\nbetween thresholds (50% - 74%) | ![Code Coverage](https://img.shields.io/badge/Code%20Coverage-65%25-yellow?style=flat)\nequal or greater than upper threshold (75%) | ![Code Coverage](https://img.shields.io/badge/Code%20Coverage-83%25-success?style=flat)\n\nSee [`thresholds`](#thresholds) to change these values.\n\n\n### `fail_below_min`\n\nFail the workflow if the overall Line Rate is below lower threshold - `true` or `false` (default). The default lower threshold is 50%, see [`thresholds`](#thresholds).\n\n\n### `format`\n\nOutput Format - `markdown` or `text` (default).\n\n\n### `hide_branch_rate`\n\nHide Branch Rate metrics in the output - `true` or `false` (default).\n\n\n### `hide_complexity`\n\nHide Complexity metrics in the output - `true` or `false` (default).\n\n\n### `indicators`\n\nInclude health indicators in the output - `true` (default) or `false`.\n\nLine Rate | Indicator\n--------- | ---------\nless than lower threshold (50%) | ❌\nbetween thresholds (50% - 74%) | ➖\nequal or greater than upper threshold (75%) | ✔\n\nSee [`thresholds`](#thresholds) to change these values.\n\n\n### `output`\n\nOutput Type - `console` (default), `file` or `both`.\n\n`console` will output the coverage summary to the GitHub Action log.\n\n`file` will output the coverage summary to `code-coverage-results.txt` for text or `code-coverage-results.md` for markdown format in the workflow's working directory.\n\n`both` will output the coverage summary to the Action log and a file as above.\n\n\n### `thresholds`\n\nLower and upper threshold percentages for badge and health indicators, lower threshold can also be used to fail the action. Separate the values with a space and enclose them in quotes; default `'50 75'`.\n\n\n## Outputs\n\n### Text Example\n```\nhttps://img.shields.io/badge/Code%20Coverage-83%25-success?style=flat\n\nCompany.Example: Line Rate = 83%, Branch Rate = 69%, Complexity = 671, ✔\nCompany.Example.Library: Line Rate = 27%, Branch Rate = 100%, Complexity = 11, ❌\nSummary: Line Rate = 83% (1212 / 1460), Branch Rate = 69% (262 / 378), Complexity = 682, ✔\nMinimum allowed line rate is 50%\n```\n\n\n### Markdown Example\n\n\u003e ![Code Coverage](https://img.shields.io/badge/Code%20Coverage-83%25-success?style=flat)\n\u003e \n\u003e Package | Line Rate | Branch Rate | Complexity | Health\n\u003e -------- | --------- | ----------- | ---------- | ------\n\u003e Company.Example | 83% | 69% | 671 | ✔\n\u003e Company.Example.Library | 27% | 100% | 11 | ❌\n\u003e **Summary** | **83%** (1212 / 1460) | **69%** (262 / 378) | 682 | ✔\n\u003e \n\u003e _Minimum allowed line rate is `50%`_\n\n\n## Usage\n\n```yaml\nname: Code Coverage Summary Report\nuses: irongut/CodeCoverageSummary@v1.3.0\nwith:\n  filename: coverage.cobertura.xml\n```\n\n\n### .Net Workflow Example\n\n```yaml\nname: .Net 6 CI Build\n\non:\n  push:\n    branches: [ master ]\n  pull_request:\n    branches: [ master ]\n\njobs:\n  build:\n    runs-on: ubuntu-latest\n    name: CI Build\n    steps:\n    - name: Checkout\n      uses: actions/checkout@v2\n\n    - name: Setup .NET\n      uses: actions/setup-dotnet@v1\n      with:\n        dotnet-version: 6.0.x\n\n    - name: Restore Dependencies\n      run: dotnet restore src/Example.sln\n\n    - name: Build\n      run: dotnet build src/Example.sln --configuration Release --no-restore\n\n    - name: Test\n      run: dotnet test src/Example.sln --configuration Release --no-build --verbosity normal --collect:\"XPlat Code Coverage\" --results-directory ./coverage\n\n    - name: Code Coverage Report\n      uses: irongut/CodeCoverageSummary@v1.3.0\n      with:\n        filename: coverage/**/coverage.cobertura.xml\n        badge: true\n        fail_below_min: true\n        format: markdown\n        hide_branch_rate: false\n        hide_complexity: true\n        indicators: true\n        output: both\n        thresholds: '60 80'\n\n    - name: Add Coverage PR Comment\n      uses: marocchino/sticky-pull-request-comment@v2\n      if: github.event_name == 'pull_request'\n      with:\n        recreate: true\n        path: code-coverage-results.md\n```\n\n\n## Version Numbers\n\nVersion numbers will be assigned according to the [Semantic Versioning](https://semver.org/) scheme.\nThis means, given a version number MAJOR.MINOR.PATCH, we will increment the:\n\n1. MAJOR version when we make incompatible API changes\n2. MINOR version when we add functionality in a backwards compatible manner\n3. PATCH version when we make backwards compatible bug fixes\n\n\n## Contributing\n\n### Report Bugs\n\nPlease make sure the bug is not already reported by searching existing [issues].\n\nIf you're unable to find an existing issue addressing the problem please [open a new one][new-issue]. Be sure to include a title and clear description, as much relevant information as possible, a workflow sample and any logs demonstrating the problem.\n\n\n### Suggest an Enhancement\n\nPlease [open a new issue][new-issue].\n\n\n### Submit a Pull Request\n\nDiscuss your idea first, so that your changes have a good chance of being merged in.\n\nSubmit your pull request against the `master` branch.\n\nPull requests that include documentation and relevant updates to README.md are merged faster, because you won't have to wait for somebody else to complete your contribution.\n\n\n## License\n\nCode Coverage Summary is available under the MIT license, see the [LICENSE](LICENSE) file for more info.\n\n[issues]: https://github.com/irongut/CodeCoverageSummary/issues\n[new-issue]: https://github.com/irongut/CodeCoverageSummary/issues/new\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Firongut%2Fcodecoveragesummary","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Firongut%2Fcodecoveragesummary","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Firongut%2Fcodecoveragesummary/lists"}