pycobertura icon indicating copy to clipboard operation
pycobertura copied to clipboard

Coverage is not reported on Github PR file changes as mentioned in the documentation

Open mohamedrez opened this issue 1 year ago • 4 comments

Hello and thank you for this package.

I am currently using this to report the missing covered lines on the PR: pycobertura show --format github-annotation cov.xml

It is being reported on the Action: Screenshot 2024-07-23 at 11 10 48 am

But not in the file changes: image

I needed the same as mentioned on the documentation: image

mohamedrez avatar Jul 23 '24 10:07 mohamedrez

@goatwu1993 can you help answer? I'm not familiar with GitHub annotations.

aconrad avatar Jul 25 '24 08:07 aconrad

hmm. works at my repo. Just triggered another run. https://github.com/goatwu1993/pycobertura-test/pull/7

goatwu1993 avatar Jul 26 '24 02:07 goatwu1993

@mohamedrez It seems to be the error of the file path. your filename is under the ./rover (rover/common/xxx) while the cobertura (cov.xml) doesn't (common/xxx)

goatwu1993 avatar Jul 26 '24 02:07 goatwu1993

probably can leverage the source/source prefix/filesystem/real_filename but I do not know where to add.

goatwu1993 avatar Jul 26 '24 03:07 goatwu1993