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

Display result summary when using workflow_dispatch or schedule #514

Closed
Fgerthoffert opened this issue Feb 15, 2022 · 5 comments · Fixed by #520
Closed

Display result summary when using workflow_dispatch or schedule #514

Fgerthoffert opened this issue Feb 15, 2022 · 5 comments · Fixed by #520
Assignees

Comments

@Fgerthoffert
Copy link

Hi,

Is there a way to get results displayed in the summary when tests are triggered using workflow_dispatch or schedule ?

When the trigger is a change in code, the results are shown in the run summary.

Using workflow_dispatch or schedule, the results are still visible in the action logs, but it would be super helpful if they could be brought up to the summary.

  ℹ️ 137 tests run, 2 skipped, 3 failed.
  ℹ️ Posting with conclusion 'failure' to refs/heads/master (sha: 31719493de9c531f39891431db477a3f8393989

Thanks,

@mikepenz
Copy link
Owner

@Fgerthoffert thank you for the ticket.

It could be that when actions are part of a workflow_dispatch trigger, that the contained github context points towards the wrong repo.

As you can see here the github API is used to create the checks / update the checks on the repo according to the github context:
https://github.com/mikepenz/action-junit-report/blob/main/src/main.ts#L105-L134

It could also be that the token is just not having the right scope in such cases resulting in it not being allowed to add the checks.

Is the run you referenced visible open source?

@mikepenz mikepenz self-assigned this Feb 16, 2022
@Fgerthoffert
Copy link
Author

Thanks for the quick response @mikepenz

The particular repo this was happening on is not open-source, but the same workflow is soon going to be ported over to some of our public repos, once done I'll update this issue with links to some runs.

In the meantime, I will enable debug to see if I can get more data from the content of createCheckRequest

@mikepenz
Copy link
Owner

Thank you very much.

@Fgerthoffert
Copy link
Author

Out of curiosity, did you consider using core.notice(), core.warning() or core.error() instead of manually creating an annotation via octokit?

https://github.com/actions/toolkit/blob/main/packages/core/README.md#annotations

I'm using it on a small action and it does show the annotation for jobs triggered via workflow_dispatch or schedule.

@mikepenz
Copy link
Owner

mikepenz commented Mar 7, 2022

No we didn't use that one yet.
Potentially worth a try, not sure on it's performance though compared to the API request

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 a pull request may close this issue.

2 participants