Skip to content

Add Python code coverage reporting with Cobertura XML output - #532

Open
pobonomo with code-coverage-agent[bot] wants to merge 1 commit into
mainfrom
code-coverage-agent/setup-code-coverage-reporting
Open

pobonomo with code-coverage-agent[bot] wants to merge 1 commit into
mainfrom
code-coverage-agent/setup-code-coverage-reporting

Conversation

@code-coverage-agent

@code-coverage-agent code-coverage-agent AI commented Aug 5, 2026 •

Copy link
Copy Markdown

Integrates pytest-cov coverage reporting into the existing CI workflows, producing Cobertura XML reports and uploading them to GitHub's code coverage API for PR annotations and trend tracking.

Coverage configuration

  • setup.cfg — adds [coverage:run] (branch coverage over src/gurobi_ml) and [coverage:report] sections so coverage settings are respected by IDEs and local runs
  • tox.ini — adds --cov=src/gurobi_ml --cov-report=xml:coverage.xml to the all_deps env (the broadest test run covering all ML frameworks); pytest-cov was already a dep in [base]

CI integration

Both PR and push workflows are augmented with a two-job upload pattern:

  • Artifact upload step added to the test job, gated to the py312/gurobi13 matrix entry to avoid artifact name collisions and redundant uploads
  • upload-coverage-python job downloads the artifact and calls actions/upload-code-coverage@v1

push.yml (default-branch baseline):

upload-coverage-python:
  needs: test
  if: ${{ !cancelled() && needs.test.result == 'success' }}
  permissions:
    contents: read
    code-quality: write

PR_nolicense.yml (PR feedback):

  • Fork PR guards on both the artifact upload step and the upload job
  • pull-requests: read added to the upload job so it can resolve the open PR number from a branch push

Code Coverage Agent started work on behalf of pobonomo August 5, 2026 05:52
@code-coverage-agent code-coverage-agent AI changed the title [WIP] Add code coverage reporting integration to CI workflows Add Python code coverage reporting with Cobertura XML output Aug 5, 2026
@code-coverage-agent
code-coverage-agent AI marked this pull request as ready for review August 5, 2026 05:56
Code Coverage Agent finished work on behalf of pobonomo August 5, 2026 05:56
@github-code-quality

github-code-quality Bot commented Aug 5, 2026 •

Copy link
Copy Markdown

Code coverage overview

Languages: Python

Python / code-coverage-agent

main code-coverage-agent/... 58a0e66 +/-
— 0% —

Line coverage data for the main branch is not yet available.

View coverage of the 10 most covered files.
File main code-coverage-agent/... 58a0e66 +/-
__init__.py — 0% —
_version.py — 0% —
add_predictor.py — 0% —
exceptions.py — 0% —
keras/__init__.py — 0% —
keras/keras.py — 0% —
lightgbm/__init__.py — 0% —
lightgbm/lgbm_regressor.py — 0% —
lightgbm_sklearn_api.py — 0% —
modeling/__init__.py — 0% —

ℹ️ Calculations represent line coverage. Results may change as calculations are updated.


Updated November 21, 2026 12:55 UTC

Co-authored-by: pobonomo <15269857+pobonomo@users.noreply.github.com>
@pobonomo
pobonomo force-pushed the code-coverage-agent/setup-code-coverage-reporting branch from 25b352d to 58a0e66 Compare November 21, 2026 12:46

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