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

Add coverage report on testing #9629

Closed
estepona opened this issue Aug 15, 2024 · 4 comments · Fixed by #9726
Closed

Add coverage report on testing #9629

estepona opened this issue Aug 15, 2024 · 4 comments · Fixed by #9726
Assignees
Labels
kind/feature Feature requests/implementations status/triage This issue needs to be triaged

Comments

@estepona
Copy link

estepona commented Aug 15, 2024

Issue Kind

Brand new capability

Description

Hi. As mentioned in this Test Suite Cleanup issue, there might be some code needing coverage, yet running poetry run pytest doesn't tell the coverage. I'd like to contribute to this task by first adding a coverage report that everyone can see locally and in CI.

Impact

Rendering a coverage report by running the tests.

Workarounds

N/A

@estepona estepona added kind/feature Feature requests/implementations status/triage This issue needs to be triaged labels Aug 15, 2024
@estepona
Copy link
Author

Hi @abn @Secrus @dimbleby @radoering, could you please advise?

@radoering
Copy link
Member

Might make sense.

It should probably mentioned in https://python-poetry.org/docs/contributing#local-development (source) how to create a coverage report locally.

In CI, the challenge is to create coverage reports for all Python versions and platforms and combine the results. Further, we should keep an eye on runtimes (how much slower tests become with coverage).

@Secrus
Copy link
Member

Secrus commented Aug 17, 2024

Since we have pytest-cov plugin, I think seeing local coverage would be as simple as running poetry run pytest --cov=src/poetry --cov-report term. I would be all for adding the coverage report on CI, but since GH doesn't support reading coverage report files from CI, that would have to be hacked around, outsourced to another service (like codecov), or would only be visible when browsing CI logs, which expire after some time. Overall, it's not worth the work needed and the maintenance burden.
I agree that info about how to see coverage locally should be added to contributing docs, but nothing beyond that.

Copy link

github-actions bot commented Nov 2, 2024

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/feature Feature requests/implementations status/triage This issue needs to be triaged
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants