{"id":19167224,"url":"https://github.com/fingerprintjs/action-coverage-report-md","last_synced_at":"2025-08-21T03:13:03.907Z","repository":{"id":64439986,"uuid":"561731146","full_name":"fingerprintjs/action-coverage-report-md","owner":"fingerprintjs","description":"GitHub action for creating markdown coverage report from Istanbul text report","archived":false,"fork":false,"pushed_at":"2024-07-25T11:07:45.000Z","size":1286,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-04-28T00:47:46.557Z","etag":null,"topics":["coverage","coverage-report","github-actions","jest","markdown","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/fingerprintjs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"contributing.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-11-04T11:11:14.000Z","updated_at":"2025-03-18T21:49:02.000Z","dependencies_parsed_at":"2024-03-11T21:32:20.920Z","dependency_job_id":"d3bbe462-bae7-4176-913e-d1bf2f32fc44","html_url":"https://github.com/fingerprintjs/action-coverage-report-md","commit_stats":{"total_commits":72,"total_committers":3,"mean_commits":24.0,"dds":0.375,"last_synced_commit":"fbb25d0ff5f3542314068088ab8f657206ebf84e"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":"actions/typescript-action","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fingerprintjs%2Faction-coverage-report-md","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fingerprintjs%2Faction-coverage-report-md/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fingerprintjs%2Faction-coverage-report-md/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fingerprintjs%2Faction-coverage-report-md/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fingerprintjs","download_url":"https://codeload.github.com/fingerprintjs/action-coverage-report-md/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252888848,"owners_count":21820077,"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","coverage-report","github-actions","jest","markdown","typescript"],"created_at":"2024-11-09T09:36:23.551Z","updated_at":"2025-05-07T13:40:44.117Z","avatar_url":"https://github.com/fingerprintjs.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/actions/typescript-action/actions\"\u003e\u003cimg alt=\"typescript-action status\" src=\"https://github.com/actions/typescript-action/workflows/build-test/badge.svg\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n# Jest coverage report in Markdown\n\nThis action uses a text coverage report from Jest and generates a Markdown report based on it in the format shown below.\nThe table shows the status of each file. Each file and uncovered line is properly linked to it's examined version on\nGitHub.\n\nSt|File                | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s\n--|--------------------|---------|----------|---------|---------|-------------------\n🟡|All files           |   70.58 |    72.22 |   83.33 |   71.42 |\n🟡|\u0026nbsp;src|   63.23 |    64.28 |      80 |   64.17 |\n🔴|\u0026nbsp;\u0026nbsp;[main.ts](https://github.com/fingerprintjs/action-coverage-report-md/blob/80148ef2d10c51d31e3a472c61ce2ead8b68a2e1/src/main.ts)|       0 |        0 |       0 |       0 |[1-37](https://github.com/fingerprintjs/action-coverage-report-md/blob/80148ef2d10c51d31e3a472c61ce2ead8b68a2e1/src/main.ts#L1-L37)\n🟢|\u0026nbsp;\u0026nbsp;[report.ts](https://github.com/fingerprintjs/action-coverage-report-md/blob/80148ef2d10c51d31e3a472c61ce2ead8b68a2e1/src/report.ts)|   95.55 |      100 |   88.88 |   95.55 |[14-15](https://github.com/fingerprintjs/action-coverage-report-md/blob/80148ef2d10c51d31e3a472c61ce2ead8b68a2e1/src/report.ts#L14-L15)\n🟢|\u0026nbsp;src/utils|     100 |      100 |     100 |     100 |\n🟢|\u0026nbsp;\u0026nbsp;[getReportParts.ts](https://github.com/fingerprintjs/action-coverage-report-md/blob/80148ef2d10c51d31e3a472c61ce2ead8b68a2e1/src/utils/getReportParts.ts)|     100 |      100 |     100 |     100 |\n🟢|\u0026nbsp;\u0026nbsp;[status.ts](https://github.com/fingerprintjs/action-coverage-report-md/blob/80148ef2d10c51d31e3a472c61ce2ead8b68a2e1/src/utils/status.ts)|     100 |      100 |     100 |     100 |\n\n\u003e **Note**\n\u003e This package isn’t part of our core product. It’s kindly shared “as-is” without any guaranteed level of support from Fingerprint. We warmly welcome community contributions.\n\n## Usage\n\nThe action returns a `markdownReport` output that you can use in other actions. The example below shows how to use the\nreport in a pull request comment.\n\n```yaml\nsteps:\n  - name: Prepare coverage report in markdown\n    uses: fingerprintjs/action-coverage-report-md@v2\n    id: coverage\n  - name: Add coverage comment to the PR\n    uses: marocchino/sticky-pull-request-comment@v2\n    with:\n      message: ${{ steps.coverage.outputs.markdownReport }}\n```\n\n### Extended usage\n\n```yaml\nsteps:\n  - name: Prepare coverage report in markdown\n    uses: fingerprintjs/action-coverage-report-md@v2\n    id: coverage\n    with:\n      textReportPath: './coverage/text-report.txt'\n      srcBasePath: './utils'\n  - name: Add coverage comment to the PR\n    uses: marocchino/sticky-pull-request-comment@v2\n    with:\n      message: ${{ steps.coverage.outputs.markdownReport }}\n```\n\n#### Add coverage report to the job summary\n\nYou can add a code coverage report to the job summary. For more information, see\n[Adding a job summary](https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary) in the GitHub Actions documentation.\n\n![Job summary example](resources/job_summary_example.png)\n\n```yaml\nsteps:\n  - name: Prepare coverage report in markdown\n    uses: fingerprintjs/action-coverage-report-md@v2\n    id: coverage\n    with:\n      textReportPath: './coverage/text-report.txt'\n      srcBasePath: './utils'\n  - name: Add coverage report to the job summary\n    run: |\n      echo \"## Code Coverage\" \u003e\u003e $GITHUB_STEP_SUMMARY\n      echo \"${{ steps.coverage.outputs.markdownReport }}\" \u003e\u003e $GITHUB_STEP_SUMMARY\n```\n\n## API\n\n### Inputs\n\n| Name             | Type     | Default Value               | Description                                                                          |\n|------------------|----------|-----------------------------|--------------------------------------------------------------------------------------|\n| `textReportPath` | `string` | `'./coverage/coverage.txt'` | Path to the coverage report in the [Istanbul](https://istanbul.js.org/) text format. |\n| `srcBasePath`    | `string` | `'./src'`                   | Base path for the source folder.                                                     |\n\n### Outputs\n\n| Name             | Type     | Description                         |\n|------------------|----------|-------------------------------------|\n| `markdownReport` | `string` | Coverage report in Markdown format. |\n\n## How to get a text coverage report\n\n### Jest\n\n* Using a CLI:\n\n```shell\nnpx jest --coverage --coverageReporters=\"text\" \u003e coverage.txt\n```\n\n* Using a Configuration file:\n\n```js\nmodule.exports = {\n  // ... other settings\n  coverageReporters: [['text', { file: 'coverage.txt', path: './' }]],\n};\n```\n\n### nyc (Istanbul)\n\n* Using a CLI:\n\n```shell\nnpx nyc report --reporter=text \u003e ./coverage/coverage.txt\n```\n\n* Using a Configuration file:\n\n```js\nmodule.exports = {\n  // ... other settings\n  \"reporter\": [\"text\"],\n  \"report-dir\": \"./coverage\"  // will generate a file ./coverage/text.txt\n}\n```\n### Karma\n\n```js\nmodule.exports = function(config) {\n  config.set({\n    // ... other settings\n    reporters: ['coverage'],\n    coverageReporter: {\n        type : 'text',\n        dir: './coverage',\n        file: 'coverage.txt'\n    }\n  });\n};\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffingerprintjs%2Faction-coverage-report-md","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffingerprintjs%2Faction-coverage-report-md","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffingerprintjs%2Faction-coverage-report-md/lists"}