Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

link missing files fails for windows action #86

Open
wolframhaussig opened this issue Jul 28, 2023 · 3 comments
Open

link missing files fails for windows action #86

wolframhaussig opened this issue Jul 28, 2023 · 3 comments

Comments

@wolframhaussig
Copy link

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:

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?

@ryanhendersonabs
Copy link

I'm seeing the same behavior, also on a Windows runner.

@wolframhaussig
Copy link
Author

@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

@ryanhendersonabs
Copy link

@wolframhaussig awesome, thanks for sharing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants