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

Support multiple sources #277

Open
amine-orca opened this issue Nov 29, 2023 · 0 comments
Open

Support multiple sources #277

amine-orca opened this issue Nov 29, 2023 · 0 comments

Comments

@amine-orca
Copy link

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.

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

1 participant