https://github.com/kntng/mdcov
GitHub Action to update PRs with markdown coverage reports from LCOV file
https://github.com/kntng/mdcov
action code-coverage coverage lcov markdown
Last synced: 2 days ago
JSON representation
GitHub Action to update PRs with markdown coverage reports from LCOV file
- Host: GitHub
- URL: https://github.com/kntng/mdcov
- Owner: kntng
- Created: 2025-05-24T20:58:52.000Z (about 1 month ago)
- Default Branch: main
- Last Pushed: 2025-05-25T21:36:35.000Z (about 1 month ago)
- Last Synced: 2025-06-02T06:21:33.047Z (24 days ago)
- Topics: action, code-coverage, coverage, lcov, markdown
- Language: TypeScript
- Homepage:
- Size: 391 KB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# :memo: mdcov
Generate coverage reports in markdown for GitHub PRs.
## Usage
In your workflow `.yml` file use the following step:
```yaml
- uses: kntng/mdcov@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
lcov-path: coverage/lcov.info
```replacing `coverage/lcov.info` with the proper path to the coverage file.
Note this action requires additional permissions on the token to write to pull requests, so add the following:
```yaml
permissions:
issues: write
pull-requests: write
```## Example
A simple example triggers on pull requests. It checks out the repository, runs coverage, then uses the action to write the report to the PR.
```yaml
name: Code Coverageon:
pull_request:
paths:
- "**/*.ts"
- "**/*.js"
- ".github/workflows/coverage.yml"permissions:
issues: write
pull-requests: writejobs:
coverage:
name: Run coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Run coverage
run: bun run coverage
- uses: kntng/mdcov@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
lcov-path: coverage/lcov.info
```