Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add job summary that can be used when running action as a workflow dispatch #372

Closed
wants to merge 11 commits into from

Conversation

JohNan
Copy link
Contributor

@JohNan JohNan commented Aug 3, 2022

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'

@JohNan
Copy link
Contributor Author

JohNan commented Aug 8, 2022

@kishikawakatsumi Any feedback on this PR is appreciated!

@kishikawakatsumi
Copy link
Owner

@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.

@JohNan
Copy link
Contributor Author

JohNan commented Aug 16, 2022

Thank you @kishikawakatsumi
I'm not sure why the tests are failing in your repo, but they are passing in my repo: JohNan#1

Could it be some kind of permission problem since it's a pull request originating from a different repo?

@JohNan
Copy link
Contributor Author

JohNan commented Sep 8, 2022

Had any time looking at the PR? :)

@kishikawakatsumi
Copy link
Owner

I'm looking into it now. Merging soon. Sorry for the late.

@kishikawakatsumi
Copy link
Owner

Supersedes #454

@kishikawakatsumi
Copy link
Owner

Released in v1.6.0

@JohNan
Copy link
Contributor Author

JohNan commented Sep 26, 2022

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.

@kishikawakatsumi
Copy link
Owner

I see. It seems like a good idea to have a mechanism to output information that can be used by subsequent actions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants