When I configured the action to run using working_directory it worked okay but the annotations where not shown in the PR files section. But they were shown when checking the job itself in the Checks tab.
Given working_directory: 'packages/web-ui'
The annotation was shown as

And the path src/components doesn't really exist, it should be packages/web-ui/src/components
I then changed my configuration to not use working_directory and run the test command from the root, which resulted in this annotation

Which was shown correctly in the files tab.
Looking into the code I think the culprit is the following line
|
path: result.name.replace(cwd, ""), |
Where the whole cwd is being deleted, but if working_directory was defined it's also part of that string and it shouldn't be removed.
When I configured the action to run using
working_directoryit worked okay but the annotations where not shown in the PR files section. But they were shown when checking the job itself in the Checks tab.Given
working_directory: 'packages/web-ui'The annotation was shown as
And the path
src/componentsdoesn't really exist, it should bepackages/web-ui/src/componentsI then changed my configuration to not use
working_directoryand run the test command from the root, which resulted in this annotationWhich was shown correctly in the files tab.
Looking into the code I think the culprit is the following line
jest-github-action/src/action.ts
Line 197 in 43bbcd0
Where the whole
cwdis being deleted, but ifworking_directorywas defined it's also part of that string and it shouldn't be removed.