File tree 4 files changed +42
-5
lines changed
4 files changed +42
-5
lines changed Original file line number Diff line number Diff line change 2
2
3
3
This action runs [ go-patch-cover] ( https://github.com/seriousben/go-patch-cover ) to display test coverage for code changed within a pull request.
4
4
5
+ ![ Comment example] ( docs/comment-example.png#gh-dark-mode-only )
6
+ ![ Comment example] ( docs/comment-example-light.png#gh-light-mode-only )
7
+
8
+ ## Permissions
9
+
10
+ - ` pull-requests: write ` for writing comments on pull requests.
11
+ - ` contents: write ` for the git-notes prev_coverage_mode to maintain the coverage within git notes.
12
+
13
+ ## Usage
14
+
15
+ Just add ` seriousben/go-patch-cover-action ` as a step in your existing workflow.
16
+
17
+ A workflow might look like this:
18
+
19
+ ``` yaml
20
+ name : " CI"
21
+
22
+ on : ["push", "pull_request"]
23
+
24
+ permissions :
25
+ contents : write
26
+ pull-requests : write
27
+
28
+ jobs :
29
+ ci :
30
+ name : " Run CI"
31
+ runs-on : ubuntu-latest
32
+ steps :
33
+ - uses : actions/checkout@v2
34
+ -
uses :
WillAbides/[email protected]
35
+ with :
36
+ go-version : " *"
37
+ - run : " go test -coverprofile=coverage.out -covermode=count ./..."
38
+ -
uses :
seriousben/[email protected]
39
+ with :
40
+ version : main
41
+ ` ` `
42
+
43
+ Please see [GitHub's documentation on Actions](https://docs.github.com/en/actions) for extensive
44
+ documentation on how to write and tweak workflows.
45
+
Original file line number Diff line number Diff line change 1
1
name : " Go Patch Coverage"
2
2
description : |
3
3
Display golang patch test coverage on your pull requests.
4
-
5
- Required permissions:
6
- - `pull-requests: write` for writing comments on pull requests.
7
- - `contents: write` for the git-notes prev_coverage_mode to maintain the coverage within git notes.
8
4
author : " Benjamin Boudreau"
9
5
branding :
10
6
icon : " code"
@@ -149,4 +145,4 @@ runs:
149
145
git push origin refs/notes/coverage
150
146
shell : bash
151
147
env :
152
- coverage_filename : ${{ inputs.coverage_filename }}
148
+ coverage_filename : ${{ inputs.coverage_filename }}
You can’t perform that action at this time.
0 commit comments