Skip to content

Commit

Permalink
Merge pull request #598 from mikepenz/feature/additional_output
Browse files Browse the repository at this point in the history
Additional action output
  • Loading branch information
mikepenz authored Jul 15, 2022
2 parents 8b8d3c8 + b76182b commit e41d91d
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 1 deletion.
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,23 @@ jobs:
| `update_check` | Optional. Uses an alternative API to update checks, use for cases with more than 50 annotations. |
| `annotate_only` | Optional. Will only annotate the results on the files, won't create a check run. |

### Action outputs

After action execution it will return the test counts as output.

```yml
# ${{steps.{CHANGELOG_STEP_ID}.outputs.total}}
```

A full set list of possible output values for this action.

| **Output** | **Description** |
|-----------------------|----------------------------------------------------------------------------------------|
| `outputs.total` | The total number of test cases covered by this test-step. |
| `outputs.passed` | The number of passed test cases. |
| `outputs.skipped` | The number of skipped test cases. |
| `outputs.failed` | Then umber of failed test cases. |

## Sample 🖥️

<div align="center">
Expand Down
2 changes: 2 additions & 0 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ export async function run(): Promise<void> {
).length
const passed = testResult.count - failed - testResult.skipped

core.setOutput('total', testResult.count)
core.setOutput('passed', passed)
core.setOutput('skipped', testResult.skipped)
core.setOutput('failed', failed)

let title = 'No test results found!'
Expand Down

0 comments on commit e41d91d

Please sign in to comment.