Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .github/workflows/PR_nolicense.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,28 @@ jobs:
GUROBI_VERSION: ${{ matrix.gurobi-version }}
run: |
uvx tox
- name: Upload coverage artifact
if: matrix.python-version == '3.12' && matrix.gurobi-version == 'gurobi13' && github.event.pull_request.head.repo.full_name == github.repository
uses: actions/upload-artifact@v7
with:
name: coverage-report-python
path: coverage.xml

upload-coverage-python:
needs: test
if: ${{ !cancelled() && needs.test.result == 'success' && github.event.pull_request.head.repo.full_name == github.repository }}
runs-on: ubuntu-latest
permissions:
contents: read
code-quality: write
pull-requests: read
steps:
- name: Download coverage artifact
uses: actions/download-artifact@v8
with:
name: coverage-report-python
- uses: actions/upload-code-coverage@v1
with:
file: coverage.xml
language: Python
label: code-coverage-agent
24 changes: 24 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ jobs:
GUROBI_VERSION: ${{ matrix.gurobi-version }}
run: |
uvx tox
- name: Upload coverage artifact
if: matrix.python-version == '3.12' && matrix.gurobi-version == 'gurobi13'
uses: actions/upload-artifact@v7
with:
name: coverage-report-python
path: coverage.xml

examples:
needs: test
Expand Down Expand Up @@ -88,3 +94,21 @@ jobs:
run: |
python_version_no_dot=$(echo "${{ matrix.python-version }}" | tr -d '.')
uvx tox -e py${python_version_no_dot}-examples-${{ matrix.gurobi-version }}

upload-coverage-python:
needs: test
if: ${{ !cancelled() && needs.test.result == 'success' }}
runs-on: ubuntu-latest
permissions:
contents: read
code-quality: write
steps:
- name: Download coverage artifact
uses: actions/download-artifact@v8
with:
name: coverage-report-python
- uses: actions/upload-code-coverage@v1
with:
file: coverage.xml
language: Python
label: code-coverage-agent
9 changes: 9 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,12 @@ packages = find:

[options.packages.find]
where = src

[coverage:run]
source = src/gurobi_ml
branch = true

[coverage:report]
omit =
/tmp/*
/private/*
3 changes: 2 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,8 @@ deps =
-r{toxinidir}/requirements.xgboost.txt
-r{toxinidir}/requirements.lightgbm.txt
commands =
pytest tests/test_sklearn \
pytest --cov=src/gurobi_ml --cov-report=xml:coverage.xml \
tests/test_sklearn \
tests/test_lightgbm \
tests/test_xgboost \
tests/test_keras \
Expand Down
Loading