-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from seriousben/prep-release
- Loading branch information
Showing
4 changed files
with
42 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,44 @@ | |
|
||
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: write | ||
|
||
jobs: | ||
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/[email protected] | ||
with: | ||
version: main | ||
``` | ||
Please see [GitHub's documentation on Actions](https://docs.github.com/en/actions) for extensive | ||
documentation on how to write and tweak workflows. | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.