Skip to content

Conversation

@derekk-nm
Copy link
Contributor

These code changes allow the test action to toggle on collection of code coverage metrics while pytest is running. This uses the pytest-cov package to collect and report the metrics.
metrics are consolidated in a compressed artifact attached to the test action.
metrics are reported as both a .json file and .html files.

Run of the test action w/ no code coverage requested, to demonstrate default behavior matches the existing behavior: https://github.com/neuralmagic/compressed-tensors/actions/runs/16126116474
Run of the test action w/ code coverage requested has the collected results available as an artifact at the bottom of the summary:
https://github.com/neuralmagic/compressed-tensors/actions/runs/16010001155

@derekk-nm derekk-nm changed the title enable code coverage collection and reporting enable code coverage collection and reporting INFERENG-1049 Jul 7, 2025
Copy link
Collaborator

@brian-dellabetta brian-dellabetta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@dsikka dsikka merged commit a37df54 into main Jul 8, 2025
2 of 3 checks passed
@dsikka dsikka deleted the dmk/code_coverage branch July 8, 2025 14:17
Etelis added a commit to Etelis/compressed-tensors that referenced this pull request Sep 11, 2025
…ject#382)

* enable collection of code coverage metrics during test execution

* upload coversage results as run artifact

* debugging env var use

* we don't use uv in this repo

* point coverage to correct package!

* name package with underscore instead of hyphen

* helpful debug statement showing PYTEST_ADDOPTS

* debugging print statements

* looking for coverage files

* found coverage generated files.  removing debugging statements
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

Successfully merging this pull request may close these issues.

4 participants