unity-test-runner
unity-test-runner copied to clipboard
Check Run Appears Under Wrong Workflow Run When Test Runner is Run Twice on the Same Commit
Bug description
If you run the test runner multiple times on the same commit, the Check Run with the test results seems to only populate under the first workflow run for that commit.
Please observe the below images which describe the problem in more detail.
How to reproduce
- Make a workflow file using the test runner which provides the
githubTokeninput to ensure that the test results check run will show up. - Using a
workflow_dispatchtrigger (other triggers are fine, this will make it easier though), run a workflow file which runs the test runner (resulting in a workflow run that we'll callworkflow run #1). - Observe that the
Test Resultscheck run shows up properly forworkflow run #1 - Manually run the workflow file on that same branch again (not a re-trigger of
workflow run #1, but a new run of the workflow file, resulting inworkflow run #2). - Observe that the
Test Resultscheck run has not shown up properly forworkflow run #2, and that there are now 2 separateTest Resultscheck runs underworkflow run #1.
4a. Alternatively, after step 3, you could also trigger the bug by making a branch off of the branch you ran the workflow file on in step 2, then running the workflow file on the new branch (only if the new branch is still on the same commit as the base branch).
Expected behavior
Whenever the test runner is run (even if the test runner is being run on the same commit but in a different workflow run), the Check Run with the test results should appear in the workflow run where the tests were run (rather than in the first workflow run for a given commit).
Additional details
This may or may not be fixable - a cursory Google search of the problem led me to this issue, which may or may not be talking about the same problem. I'm a bit too unfamiliar with the inner workings of the Check Run mechanism to determine whether or not it their findings apply here, so I figured I'd open an issue just in case anyone else runs into this problem.