Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/seriousben/go-patch-cover-action
Go Patch Coverage reporting on your Pull Requests
https://github.com/seriousben/go-patch-cover-action
actions coverage golang
Last synced: about 1 month ago
JSON representation
Go Patch Coverage reporting on your Pull Requests
- Host: GitHub
- URL: https://github.com/seriousben/go-patch-cover-action
- Owner: seriousben
- Created: 2022-01-04T01:39:33.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-10-21T13:38:43.000Z (about 2 years ago)
- Last Synced: 2024-10-08T15:05:01.433Z (3 months ago)
- Topics: actions, coverage, golang
- Homepage:
- Size: 353 KB
- Stars: 19
- Watchers: 3
- Forks: 6
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# go-patch-cover-action
This action runs [go-patch-cover](https://github.com/seriousben/go-patch-cover) to display test coverage for code changed within a pull request.
![Comment example](docs/comment-example.png#gh-dark-mode-only)
![Comment example](docs/comment-example-light.png#gh-light-mode-only)## Permissions
- `pull-requests: write` for writing comments on pull requests.
- `contents: write` for the git-notes prev_coverage_mode to maintain the coverage within git notes.## Usage
Just add `seriousben/go-patch-cover-action` as a step in your existing workflow.
A workflow might look like this:
```yaml
name: "CI"on: ["push", "pull_request"]
permissions:
contents: write
pull-requests: writejobs:
ci:
name: "Run CI"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: WillAbides/[email protected]
with:
go-version: "*"
- run: "go test -coverprofile=coverage.out -covermode=count ./..."
- uses: seriousben/go-patch-cover-action@v1
```Please see [GitHub's documentation on Actions](https://docs.github.com/en/actions) for extensive
documentation on how to write and tweak workflows.## Thanks
This project took inspiration from https://github.com/marocchino/sticky-pull-request-comment and from https://github.com/dominikh/staticcheck-action.