Skip to content

feat(ci): add line coverage reporting and compare it with main baseline - #53

Open
lukaszstolarczuk wants to merge 4 commits into
intel:mainfrom
lukaszstolarczuk:add-coverage
Open

lukaszstolarczuk wants to merge 4 commits into
intel:mainfrom
lukaszstolarczuk:add-coverage

Conversation

@lukaszstolarczuk

@lukaszstolarczuk lukaszstolarczuk commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Line coverage from tests and examples in tests.yml.

  • Add helper coverage job after tests, it combines the data, compares it
    against the latest main and runs diff-cover on changed lines, on PRs.
  • Results are published in the job summary.
  • PRs fail if total coverage drops by more than 5%.

@lukaszstolarczuk
lukaszstolarczuk force-pushed the add-coverage branch 2 times, most recently from f22779d to 337d163 Compare October 27, 2026 17:56
@lukaszstolarczuk

Copy link
Copy Markdown
Contributor Author

@lukaszstolarczuk
lukaszstolarczuk marked this pull request as ready for review October 28, 2026 13:44
@lukaszstolarczuk
lukaszstolarczuk requested a review from a team as a code owner October 28, 2026 13:44
@lukaszstolarczuk
lukaszstolarczuk requested a balanced review from Copilot October 28, 2026 13:44

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Warning

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Copilot review overview

7 open issues
What changed in this PR

Adds CI line coverage reporting, including combining coverage from tests + examples, comparing against a main baseline, and reporting changed-line coverage via diff-cover.

Changes:

  • Collect coverage during unit/functional tests and example runs, then upload raw coverage data as an artifact.
  • Add a dedicated coverage job to combine reports, compare against main, run diff-cover, and publish a GitHub Actions summary/notice.
  • Document coverage measurement locally and add a README coverage badge.
File Description
pyproject.toml Adds coverage tooling deps/groups and configures coverage.py (paths, parallel, reporting).
examples/​LLM/​pyproject.toml Adds a lightweight dependency group to enable coverage measurement in the example venv.
examples/​E5Large/​pyproject.toml Adds a lightweight dependency group to enable coverage measurement in the example venv.
README.md Adds a coverage badge pointing to a generated gist badge.
CONTRIBUTING.md Documents how CI measures coverage and how to run coverage locally.
.github/​workflows/​tests.yml Runs tests/examples under coverage, uploads artifacts, adds a post-job coverage comparison/summary job, and attempts to update a badge.
.github/​scripts/​coverage_summary.py New script to compare current vs baseline coverage and render a job summary + notice + failure threshold.

Review effort: Lite

Comment thread .github/workflows/tests.yml Outdated
Comment thread .github/scripts/coverage_summary.py Outdated
Comment thread .github/scripts/coverage_summary.py
Comment thread .github/workflows/tests.yml
Comment thread .github/scripts/coverage_summary.py Outdated
Comment thread .github/scripts/coverage_summary.py Outdated
Comment thread .github/workflows/tests.yml Outdated
@lukaszstolarczuk
lukaszstolarczuk force-pushed the add-coverage branch 2 times, most recently from ee6a601 to 51ae08e Compare October 29, 2026 09:16
Comment thread pyproject.toml Outdated
Comment thread CONTRIBUTING.md Outdated
Comment thread .github/workflows/tests.yml Outdated
Comment thread .github/workflows/tests.yml
@lukaszstolarczuk
lukaszstolarczuk force-pushed the add-coverage branch 2 times, most recently from 412705b to c654235 Compare October 29, 2026 13:35
lukaszstolarczuk and others added 4 commits October 29, 2026 16:04
Line coverage from tests and examples in tests.yml.

- Add helper coverage job after tests, it combines the data, compares it
against the latest main and runs diff-cover on changed lines, on PRs.
- Results are published in the job summary.
- PRs fail if total coverage drops by more than 5%.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Lukasz Stolarczuk <lukasz.stolarczuk@intel.com>
Signed-off-by: Lukasz Stolarczuk <lukasz.stolarczuk@intel.com>
Signed-off-by: Lukasz Stolarczuk <lukasz.stolarczuk@intel.com>
Signed-off-by: Lukasz Stolarczuk <lukasz.stolarczuk@intel.com>

This branch has not been deployed

No deployments
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.

3 participants