File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -36,23 +36,25 @@ jobs:
36
36
+ # This needs to be run after a test job so coverage file will be available.
37
37
+ - uses: kcjpop/coverage-comments@v2
38
38
+ with:
39
+ + github-token: ${{ secrets.GITHUB_TOKEN }}
39
40
+ coverage-file: './coverage/clover.xml'
40
41
```
41
42
42
43
## Configurations
43
44
44
45
| Parameter | Description | Mandatory | Default value |
45
46
| --------------------- | ------------------------------------------------------------------------- | --------- | --------------------- |
47
+ | ` github-token ` | | Yes | ` ${{ github.token }} ` |
46
48
| ` coverage-file ` | Path to ` lcov.info ` or ` clover.xml ` file | Yes | |
47
49
| ` working-directory ` | Set working directory if project is not in root folder | No | ` './' ` |
48
50
| ` delete-old-comments ` | Keep only one coverage comment, to avoid spamming a PR with outdated info | No | ` true ` |
49
- | ` github-token ` | | No | ` ${{ github.token }} ` |
50
51
51
52
### Example: ` lcov.info ` is in a different folder
52
53
53
54
``` yaml
54
55
- uses : kcjpop/coverage-comments@v2
55
56
with :
57
+ github-token : ${{ secrets.GITHUB_TOKEN }}
56
58
coverage-file : ' front/coverage/lcov.info'
57
59
` ` `
58
60
Original file line number Diff line number Diff line change 1
1
name : ' Code coverage comments'
2
- description : ' Comment code coverage from lcov.info file in commits or PRs'
2
+ description : ' Comment code coverage from `lcov.info` or `clover.xml` file in commits or PRs'
3
+ branding :
4
+ icon : message-square
5
+ color : yellow
3
6
inputs :
4
7
github-token :
5
8
description : Github token
@@ -9,6 +12,10 @@ inputs:
9
12
description : ' Path to `lcov.info` or `clover.xml` file. It has to include the filename so we can determine how to parse the coverage result.'
10
13
required : true
11
14
default : ' ./coverage/clover.xml'
15
+ working-directory :
16
+ description : Set working directory if project is not in root folder
17
+ required : false
18
+ default : ' ./'
12
19
delete-old-comments :
13
20
description : ' Set to `true` to delete old coverage comments.'
14
21
required : false
You can’t perform that action at this time.
0 commit comments