Publishes to random workflowSee original GitHub issue
When 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:
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
- Created 3 years ago
- Comments:16 (8 by maintainers)
Top GitHub Comments
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.