irongut / CodeCoverageSummary

A GitHub Action that reads Cobertura format code coverage files and outputs a text or markdown summary.
MIT License
192 stars 54 forks source link

Implement MyPy compatibility #324

Open webknjaz opened 2 months ago

webknjaz commented 2 months ago

I'm hitting "Overall lines covered not found" (https://github.com/irongut/CodeCoverageSummary/blob/f138489/src/CodeCoverageSummary/Program.cs#L172C41-L172C74) when trying to display coverage data produced by the most used Python type checker — MyPy.

It's generated using the --cobertura-xml-report CLI flag per https://mypy.readthedocs.io/en/stable/command_line.html#cmdoption-mypy-cobertura-xml-report.

To grab an example, go to https://app.codecov.io/github/aio-libs/yarl/commit/1fe1e02357537b5cf348b2088bcedb30847fbbf9, find an upload with the MyPy flag in the widget on the right, click Download. You'll get the payload sent to the Codecov service. The beginning on the text is just a list of files, so scroll down to the <<<<<< network delimiter and you'll see the XML under it.

webknjaz commented 2 months ago

I also filed an issue over @ MyPy, as it seems to be violating the spec: https://github.com/python/mypy/issues/17689.

webknjaz commented 1 month ago

So https://github.com/python/mypy/pull/17738 has been merged yesterday. Once it gets released, we'll be able to re-test the compatibility of the produced report.