cobertura-action
cobertura-action copied to clipboard
link missing files fails for windows action
We integrated cobertura-action into a github action for .net on windows with the following config:
- uses: 5monkeys/cobertura-action@master
with:
path: ./coverage/**/coverage.cobertura.xml
skip_covered: false
show_missing: true
link_missing_lines: true
link_missing_lines_source_dir: WinFormsThemes/WinFormsThemes
minimum_coverage: 80
This works, but the links created by link_missing_lines
are broken:
- Created Url: https://github.com/Assorted-Development/winforms-themes/blob/7791d2d43f639f670c95f8756c77a5766025401b/WinFormsThemes/WinFormsThemes/Themes\FileTheme.cs?plain=1#L104-L106
- Correct Url: https://github.com/Assorted-Development/winforms-themes/blob/7791d2d43f639f670c95f8756c77a5766025401b/WinFormsThemes/WinFormsThemes/Themes/FileTheme.cs?plain=1#L104-L106
The file seems to be reported as Themes\FileTheme.cs
and is used directly in the created url instead of being translated into /
.
An example can be found here
Is this a bug or do I need to configure something else?
I'm seeing the same behavior, also on a Windows runner.
@ryanhendersonabs If you are still looking for a Workaround, this is what we currently use:
- name: Workaround for backslashes in path https://github.com/5monkeys/cobertura-action/issues/86
run: (Get-Content -path ./coverage/**/coverage.cobertura.xml -Raw) -replace '\\','/' | out-file -FilePath ./coverage/**/coverage.cobertura.xml
@wolframhaussig awesome, thanks for sharing!