Skip to content

Commit

Permalink
feat: option to write out test cases to json
Browse files Browse the repository at this point in the history
  • Loading branch information
cpdeethree committed Oct 23, 2022
1 parent 71fba75 commit ac6fcd1
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
4 changes: 4 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@ inputs:
description: 'Formatted numbers in JSON use this character to separate groups of thousands. Common values are "," or ".". Defaults to punctuation space (\u2008).'
default: ''
required: false
json_test_case_results:
description: 'Write out all individual test case results to JSON file. This may greatly increase the size of the output'
default: false
required: false

outputs:
json:
Expand Down
5 changes: 4 additions & 1 deletion composite/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,10 @@ inputs:
description: 'Formatted numbers in JSON use this character to separate groups of thousands. Common values are "," or ".". Defaults to punctuation space (\u2008).'
default: ''
required: false

json_test_case_results:
description: 'Write out all individual test case results to JSON file. This may greatly increase the size of the output'
default: false
required: false
outputs:
json:
description: "Test results as JSON"
Expand Down
2 changes: 2 additions & 0 deletions python/publish/publisher.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,8 @@ def publish_check(self,
annotations=all_annotations,
check_url=check_run.html_url
)
if self._settings.json_test_case_results:
data['cases'] = cases
self.publish_json(data)

return check_run, before_check_run
Expand Down

0 comments on commit ac6fcd1

Please sign in to comment.