Skip to content

Commit 3da0a76

Browse files
Output total percentage coverage (#47)
* Output total percentage coverage * Consistent naming Co-authored-by: Zennon Gosalvez <1798166+zgosalvez@users.noreply.github.com>
1 parent 369eb1e commit 3da0a76

File tree

5 files changed

+12
-4
lines changed

5 files changed

+12
-4
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ For more information on these inputs, see the [Workflow syntax for GitHub Action
2020
- `title-prefix`: A prefix before the title "LCOV of commit..." Optional. Default: ``
2121

2222
### Outputs
23-
None.
23+
- `total-coverage`: The total coverage from scanned files.
2424

2525
Sample comment:
2626
![Screenshot](assets/comment.png)
@@ -57,4 +57,4 @@ jobs:
5757
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.
5858

5959
## License
60-
The scripts and documentation in this project are released under the [MIT License](LICENSE)
60+
The scripts and documentation in this project are released under the [MIT License](LICENSE)

action.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,14 @@ inputs:
1919
title-prefix:
2020
description: 'A prefix before the title "LCOV of commit..." Optional. Default: ``'
2121
required: false
22+
outputs:
23+
total-coverage:
24+
description: 'The total coverage from scanned files.'
25+
2226
runs:
2327
using: 'node16'
2428
main: 'dist/main/index.js'
2529
post: 'dist/post/index.js'
2630
branding:
2731
icon: umbrella
28-
color: purple
32+
color: purple

dist/main/index.js

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/main/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ async function run() {
5252
core.info("Note: This could happen even if github-token was provided in workflow file. It could be because your github token does not have permissions for commenting in target repo.")
5353
}
5454

55+
core.setOutput("total-coverage", totalCoverage);
56+
5557
if (isFailure) {
5658
throw Error(errorMessage);
5759
}

0 commit comments

Comments
 (0)