coverage icon indicating copy to clipboard operation
coverage copied to clipboard

Support multiple sources

Open amine-orca opened this issue 1 year ago • 0 comments
trafficstars

Hi,

We are using your GitHub action but have noticed that it only supports one source for coverage. We would like to be able to support a few packages as sources for coverage so our pyproject.toml is set up as such

source = [
    "package1",
    "package2",
    "package3",
]

Which leads to a coverage.xml file like this:

...
	<sources>
		<source>package1</source>
		<source>package2</source>
		<source>package3</source>
	</sources>
...

The function parseSource can only return one source.

const regex = new RegExp(`.*<source>(?<source>.*)</source>.*`)

This ends up returning only the first matched source: package1 and so the GitHub comment only displays coverage of files belonging to the first package.

Would it be possible to support multiple sources? I'm happy to be a contributor if that's what it takes.

amine-orca avatar Nov 29 '23 14:11 amine-orca