You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+15-4Lines changed: 15 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,13 +13,16 @@ Create a workflow `.yml` file in your `.github/workflows` directory. An [example
13
13
For more information on these inputs, see the [Workflow syntax for GitHub Actions](https://docs.github.com/actions/reference/workflow-syntax-for-github-actions#jobsjob_idstepswith)
14
14
15
15
-`coverage-files`: The coverage files to scan. For example, `coverage/lcov.*.info`
16
-
-`artifact-name`: The GitHub artifact name of the generated HTML report. For example, `code-coverage-report`. _Note:_ When downloading, it will be extracted in an `html` directory
16
+
-`artifact-name`: The GitHub artifact name of the generated HTML report. For example, `code-coverage-report`. _Note:_ When downloading, it will be extracted in an `html` directory. Optional. Default: `` (Skips uploading of artifacts)
17
17
-`minimum-coverage`: The minimum coverage to pass the check. Optional. Default: `0` (always passes)
18
18
-`github-token`: Set the `${{ secrets.GITHUB_TOKEN }}` token to have the action comment the coverage summary in the pull request. This token is provided by Actions, you do not need to create your own token. Optional. Default: ``
19
19
-`working-directory`: The working directory containing the source files referenced in the LCOV files. Optional. Default: `./`
20
+
-`title-prefix`: A prefix before the title "LCOV of commit...". Optional. Default: ``
21
+
-`additional-message`: Custom text appended to the code coverage comment in the pull request. Optional. Default: ``
22
+
-`update-comment`: Set to `true` to update the previous code coverage comment if such exists. When set to `false`, a new comment is always created. Optional. Default: `false`
20
23
21
24
### Outputs
22
-
None.
25
+
-`total-coverage`: The total coverage from scanned files.
23
26
24
27
Sample comment:
25
28

@@ -40,15 +43,23 @@ jobs:
40
43
- name: Checkout code
41
44
uses: actions/checkout@v2
42
45
# ... Generate LCOV files or download it from a different job
46
+
- name: Setup LCOV
47
+
uses: hrishikesh-kadam/setup-lcov@v1
43
48
- name: Report code coverage
44
-
uses: mbta/github-actions-report-lcov@v1
49
+
uses: zgosalvez/github-actions-report-lcov@v3
45
50
with:
46
51
coverage-files: coverage/lcov.*.info
47
52
minimum-coverage: 90
48
53
artifact-name: code-coverage-report
49
54
github-token: ${{ secrets.GITHUB_TOKEN }}
50
55
working-directory: apps/my-first-app
56
+
update-comment: true
51
57
```
58
+
*Note:* Only the `pull_request` and `pull_request_target` events are supported. This action does nothing when triggered by other event types.
59
+
60
+
### Flutter Workflows
61
+
62
+
This is used in my opinionated [GitHub Actions: Flutter Workflows](https://github.com/zgosalvez/github-actions-flutter-workflows) repository along with other actions for a complete end-to-end DevOps experience.
52
63
53
64
## License
54
-
The scripts and documentation in this project are released under the [MIT License](LICENSE)
65
+
The scripts and documentation in this project are released under the [MIT License](LICENSE.md)
Copy file name to clipboardExpand all lines: action.yml
+17-4Lines changed: 17 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -8,19 +8,32 @@ inputs:
8
8
description: 'The coverage files to scan. For example, `coverage/lcov.*.info`'
9
9
required: true
10
10
artifact-name:
11
-
description: 'The GitHub artifact name of the generated HTML report. For example, `code-coverage-report`. _Note:_ When downloading, it will be extracted in an `html` directory'
12
-
required: true
11
+
description: 'The GitHub artifact name of the generated HTML report. For example, `code-coverage-report`. _Note:_ When downloading, it will be extracted in an `html` directory. Optional. Default: `` (Skips uploading of artifacts)'
13
12
minimum-coverage:
14
13
description: 'The minimum coverage to pass the check. Optional. Default: `0` (always passes)'
15
14
default: 0
16
15
github-token:
17
16
description: 'Set the GitHub token to have the action comment the coverage summary in the pull request. This token is provided by Actions, you do not need to create your own token. Optional. Default: ``'
18
17
working-directory:
19
18
description: 'The working directory containing the source files referenced in the LCOV files. Optional. Default: `./`'
19
+
title-prefix:
20
+
description: 'A prefix before the title "LCOV of commit...". Optional. Default: ``'
21
+
required: false
22
+
additional-message:
23
+
description: 'Custom text appended to the code coverage comment in the pull request. Optional. Default: ``'
24
+
required: false
25
+
update-comment:
26
+
description: 'Set to `true` to update the previous code coverage comment if such exists. When set to `false`, a new comment is always created. Optional. Default: `false`'
27
+
required: false
28
+
default: "false"
29
+
outputs:
30
+
total-coverage:
31
+
description: 'The total coverage from scanned files.'
0 commit comments