Closed troex closed 7 months ago
I've found a better solution - it appears all references to the files in xml start with file=".
and as such it was easier to replace the paths in xml file with sed
:
sed -i -E "s/(file=\")\./\1app1/g" test-results/rspec/app1.xml
replacing .
after file="
with the folder name I needed
It would nice if it would be setup individual
test_file_prefix
per each file.My use case is that I have multiple apps in a mono repository where each app has it's own directory and since all off them require same environment I do run tests for each of them in a single github job, as result I have 5 junit xml files but they are all prefixed with local relative path so in order to get annotations to show up properly I have to setup
publish-unit-test-result-action
5 times like:This works but not optimal, and I have 5 annotations instead of one.
I also tried to change how my junit reporter (formatter) works but it was not something it's easy achievable there (ruby, rspec + rspec_junit_formatter)