xcresulttool
xcresulttool copied to clipboard
Add job summary that can be used when running action as a workflow dispatch
When using this action in a workflow dispatch, such as a cron job, it can't create a "check". So to be bale to get a test summary I have added the test report to be output as job summary instead. This behaviour can be toggled using two new options.
create-check:
description: 'Whether to create a check'
required: false
default: 'true'
create-job-summary:
description: 'Whether to create a job summary. Should be used if the actions is not triggered via pull request'
required: false
default: 'false'
I also added output form the job with som stats on number of tests, failed and passed.
outputs:
failed_tests:
description: 'Number of failed tests'
passed_tests:
description: 'Number of passed tests'
skipped_tests:
description: 'Number of skipped tests'
total_tests:
description: 'Number of total tests'
@kishikawakatsumi Any feedback on this PR is appreciated!
@JohNan Thanks, the idea of outputting the Job Summary seems very good. I don't have time to check the behavior for a while, but will do so as soon as possible.
Thank you @kishikawakatsumi I'm not sure why the tests are failing in your repo, but they are passing in my repo: https://github.com/JohNan/xcresulttool/pull/1
Could it be some kind of permission problem since it's a pull request originating from a different repo?
Had any time looking at the PR? :)
I'm looking into it now. Merging soon. Sorry for the late.
Supersedes https://github.com/kishikawakatsumi/xcresulttool/pull/454
Released in v1.6.0
Thanks! You took a different approach but Im gonna try it out. I do miss the stats output though. But maybe that can be added separately? It is great when you have consecutive action that for example posts the result to Slack or something similiar.
I see. It seems like a good idea to have a mechanism to output information that can be used by subsequent actions.