test: add package coverage reporting workflow#65
Open
AlwinXue wants to merge 2 commits intoOSIPI:mainfrom
Open
test: add package coverage reporting workflow#65AlwinXue wants to merge 2 commits intoOSIPI:mainfrom
AlwinXue wants to merge 2 commits intoOSIPI:mainfrom
Conversation
Made-with: Cursor
Made-with: Cursor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi mentors! 👋
This PR addresses Issue #30 by adding automated package-level coverage reporting to the CI pipeline.
The Problem:
The repository currently has a release workflow for publishing the Python package, but it does not provide a CI signal for test coverage. That makes it harder to track whether the package test suite is expanding in a meaningful way as reliability work continues.
The Solution:
Package Test Extras: Added a
testoptional dependency group inpackage/pyproject.tomlso the CI workflow can install package test dependencies in a standard way.Coverage Workflow: Added a new GitHub Actions workflow that installs the package in editable mode with test dependencies, runs the package test suite with
pytest-cov, prints terminal coverage, and uploadscoverage.xmlandpytest.xmlas build artifacts.Focused Scope: This first version targets package-level coverage only, which keeps the workflow stable and avoids unrelated backend system-dependency issues.
Validation:
Ran
python -m pip install -e "./package[test]"andpython -m pytest package -q --cov=pyaslreport --cov-report=term-missing --cov-report=xml:package/coverage.xmllocally; the package suite passed and produced a coverage report.Note:
This PR intentionally builds on the isolated package test structure introduced in my earlier testing PR so coverage reporting runs against a cleaner package test layout.
Fixes #30