Open PascalArdex opened 1 year ago
Having exactly the same problem.
I found the following ugly workaround (since I don't really know how to debug GitHub actions)
- name: Pre-processing Coverage Report
run: sed -i 's#filename="#filename="backend-api/src/#g' tests/TestResults/*/*.xml
- name: Coverage Report
uses: 5monkeys/cobertura-action@v13
...
I backtracked to the following line https://github.com/5monkeys/cobertura-action/blob/18d911b62098eafd8b9db93d6c74194556cc3515/src/action.js#L172
In order to work as expected, the action needs to find an exact match between the filename found in the XML report and the list of files in the pull request.
Now a very likely structure for dotnet projects using XUnit is to have a top level solution file and two folders src
and tests
.
In my case I am using a mono-repo structure so it is even more complex than that.
The filenames matching could be more complex. We can compute the absolute path to the filename attributes in the XML using the
Anyway, just wanted to say this GitHub action is awesome!!! And I don't understand why Microsoft is not doing first class citizen actions for dotnet but that's another story....
We are using monorepo as well on our end and it seems like this PR fixes all issues and it works fine.
https://github.com/5monkeys/cobertura-action/pull/74
Problem it seems is getting it in main branch 😞
I encountered the same issue, is there a plan to fix this?
Hi team, any update?
I have a dotnet / C# project using
5monkeys/cobertura-action@v13
, it works great with default valuesJust tried to add the option
only_changed_files: true
as the project is getting bigger but it does not seem to have any effect. More precisely, the report is still created but only shows the header line for All filesHere is an extract of my GitHub workflow
Action executes without any problem