Skip to content

Commit

Permalink
feat: add output (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
deblockt committed Aug 28, 2023
1 parent 7ca3591 commit af1f8e7
Show file tree
Hide file tree
Showing 7 changed files with 726 additions and 1,297 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,16 @@ jobs:
check-status-on-error: 'neutral'
annotation-status-on-error: 'warning'
- uses: ./
id: success-with-empty-cucumber-report
name: "success with empty cucumber report"
with:
name: "success empty report"
access-token: ${{ secrets.GITHUB_TOKEN }}
path: "**/cucumber-report-empty.json"
- id: check-output
name: "check output for cucumber-report-empty.json"
if: steps.success-with-empty-cucumber-report.output.cucumber-report-empty_failed_scenarios != 0
run: exit 1
- uses: ./
id: job-failed
continue-on-error: true
Expand Down
15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,17 @@ This action should be used to publish action annotations from cucumber json repo
- **annotation-status-on-error** (optional, default: failure): the annotation status on error. Can be 'notice', 'warning', 'failure'
- **annotation-status-on-undefined** (optional): the annotation status on undefined steps. Can be 'notice', 'warning', 'failure'. if this property is not set, no annotation will be generated for undefined steps
- **annotation-status-on-pending** (optional): the annotation status on pending steps. Can be 'notice', 'warning', 'failure'. if this property is not set, no annotation will be generated for pending steps
- **number-of-test-error-to-fail-job** (optional): indicate the number of test in error to fail the build. If the value is -1 this action will never fail the build. By default, this action will not cause the build to fail.
- **number-of-test-error-to-fail-job** (optional): indicate the number of test in error to fail the build. If the value is -1 this action will never fail the build. By default, this action will not cause the build to fail.

## outputs

the following variable are availables as output (where output name if the json file name with ' ' replaced by '_' and wihout '.json'):
- `${output}_failed_scenarios`: number of failed scenario
- `${output}_undefined_scenarios`: number of undefined scenario
- `${output}_pending_scenarios`: number of pending scenario
- `${output}_passed_scenarios`: number of passed scenario
- `${output}_failed_steps`: number of failed steps
- `${output}_undefined_steps`: number of undefined steps
- `${output}_pending_steps`: number of pending steps
- `${output}_passed_steps`: number of passed steps

0 comments on commit af1f8e7

Please sign in to comment.