Publishes to random workflow
See original GitHub issueWhen there are multiple GitHub workflows for one commit, the action publishes the commit status to a random workflow. It should be the workflow that contains the action. This is due to GitHub’s API not allowing to specify which workflow to add the check run to.
Both REST and GraphQL APIs do not allow to specify the workflow:
- https://developer.github.com/v3/checks/runs/#create-a-check-run
- https://developer.github.com/v4/mutation/createchecksuite/
The github.run_id
workflow variable provides the check run id where the action runs.
Update 2022-05-14: With GitHub introducing “job summary”, the action now additionally publishes the results at the summary page of the workflow that runs the publish action. From there, a link to the check annotations is provided if failures exists: https://github.com/EnricoMi/publish-unit-test-result-action/tree/v1.35#github-actions-job-summary
Issue Analytics
- State:
- Created 3 years ago
- Reactions:29
- Comments:16 (8 by maintainers)
An interesting observation is that artifact uploads are workflow run specific, they end up at the right workflow: https://github.com/EnricoMi/publish-unit-test-result-action/issues/165#issuecomment-920060177. I’ll look into how that action uses the API to achieve this.
The “random workflow” issue is not fixed by the new “job summary” feature, but it helps to mitigate the impact.
The workflow that runs the publish job now contains the “job summary” with test results. In case test failures exist, the “job summary” contains a link to the test result annotations in the “random workflow”.
So the location of the test result annotations does not matter as much any more.