Skip to content

Commit

Permalink
Merge pull request #373 from Gurobi/test_gh_actions
Browse files Browse the repository at this point in the history
Test gh actions
  • Loading branch information
pobonomo authored Nov 12, 2024
2 parents 87fd9f6 + 28c52cb commit b6a0163
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/PR_license.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
gurobi-version: ["gurobi10", "gurobi11"]
gurobi-version: ["gurobi10", "gurobi11","gurobi12"]
exclude:
- python-version: "3.12"
gurobi-version: "gurobi10"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/PR_nolicense.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
gurobi-version: ["gurobi11"]
gurobi-version: ["gurobi11","gurobi12"]

steps:
- uses: actions/checkout@v4
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
gurobi-version: ["gurobi10", "gurobi11"]
gurobi-version: ["gurobi10", "gurobi11","gurobi12"]
exclude:
- python-version: "3.12"
gurobi-version: "gurobi10"
Expand Down Expand Up @@ -54,7 +54,7 @@ jobs:
run: |
tox
- name: Run examples with Gurobi 11
if: ${{ (matrix.gurobi-version == 'gurobi11') && (matrix.python-version == '3.12') }}
if: ${{ (matrix.gurobi-version != 'gurobi10') && (matrix.python-version == '3.12') }}
env:
GRB_LICENSE_FILE: ${{ steps.write-license.outputs.grb_license_file }}
GUROBI_VERSION: ${{ matrix.gurobi-version }}
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
gurobipy==11.0.3
gurobipy==12.0.0
numpy==2.0.2
pandas==2.2.2
scikit-learn==1.5.2
Expand Down
23 changes: 13 additions & 10 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# package manager then this can be achieved with "brew install libomp".

[tox]
envlist = {py39,py310,py311,py312}-{lightgbm,keras,pandas,pytorch,sklearn,xgboost,no_deps,all_deps}-{gurobi10,gurobi11},pre-commit,docs,examples-{gurobi10,gurobi11}
envlist = {py39,py310,py311,py312}-{lightgbm,keras,pandas,pytorch,sklearn,xgboost,no_deps,all_deps}-{gurobi10,gurobi11,gurobi12},pre-commit,docs,examples-{gurobi10,gurobi11,gurobi12}
isolated_build = True

[gh-actions]
Expand All @@ -18,6 +18,7 @@ python =

[gh-actions:env]
GUROBI_VERSION =
gurobi12: gurobi12
gurobi11: gurobi11
gurobi10: gurobi10

Expand All @@ -29,7 +30,7 @@ allowlist_externals = /usr/bin/make
commands =
make html

[testenv:{py39,py310,py311,py312}-examples-{gurobi10,gurobi11}]
[testenv:{py39,py310,py311,py312}-examples-{gurobi10,gurobi11,gurobi12}]
deps =
-r{toxinidir}/requirements.tox.txt
-r{toxinidir}/requirements.keras.txt
Expand All @@ -43,6 +44,7 @@ deps =
seaborn
gurobi10: gurobipy==10.0.3
gurobi11: gurobipy==11.0.3
gurobi12: gurobipy==12.0.0

changedir = {toxinidir}/notebooks
allowlist_externals = /usr/bin/make
Expand Down Expand Up @@ -80,38 +82,39 @@ deps =
pytest-cov
joblib
gurobi10: gurobipy==10.0.3
gurobi11: gurobipy==11.0.1
gurobi11: gurobipy==11.0.3
gurobi12: gurobipy==12.0.0

[testenv:{py39,py310,py311,py312}-keras-{gurobi10,gurobi11}]
[testenv:{py39,py310,py311,py312}-keras-{gurobi10,gurobi11,gurobi12}]
deps =
{[base]deps}
-r{toxinidir}/requirements.keras.txt
commands =
pytest tests/test_keras

[testenv:{py39,py310,py311,py312}-pytorch-{gurobi10,gurobi11}]
[testenv:{py39,py310,py311,py312}-pytorch-{gurobi10,gurobi11,gurobi12}]
deps =
{[base]deps}
-r{toxinidir}/requirements.pytorch.txt
commands =
pytest tests/test_pytorch

[testenv:{py39,py310,py311,py312}-sklearn-{gurobi10,gurobi11}]
[testenv:{py39,py310,py311,py312}-sklearn-{gurobi10,gurobi11,gurobi12}]
deps =
{[base]deps}
-r{toxinidir}/requirements.sklearn.txt
commands =
pytest tests/test_sklearn

[testenv:{py39,py310,py311,py312}-xgboost-{gurobi10,gurobi11}]
[testenv:{py39,py310,py311,py312}-xgboost-{gurobi10,gurobi11,gurobi12}]
deps =
{[base]deps}
-r{toxinidir}/requirements.sklearn.txt
-r{toxinidir}/requirements.xgboost.txt
commands =
pytest tests/test_xgboost

[testenv:{py39,py310,py311,py312}-lightgbm-{gurobi10,gurobi11}]
[testenv:{py39,py310,py311,py312}-lightgbm-{gurobi10,gurobi11,gurobi12}]
deps =
{[base]deps}
-r{toxinidir}/requirements.lightgbm.txt
Expand All @@ -125,15 +128,15 @@ deps =
commands =
pytest tests/test_no_deps

[testenv:{py39,py310,py311,py312}-pandas-{gurobi10,gurobi11}]
[testenv:{py39,py310,py311,py312}-pandas-{gurobi10,gurobi11,gurobi12}]
deps =
{[base]deps}
-r{toxinidir}/requirements.pandas.txt
-r{toxinidir}/requirements.sklearn.txt
commands =
pytest tests/test_pandas

[testenv:{py39,py310,py311,py312}-all_deps-{gurobi10,gurobi11}]
[testenv:{py39,py310,py311,py312}-all_deps-{gurobi10,gurobi11,gurobi12}]
deps =
{[base]deps}
-r{toxinidir}/requirements.keras.txt
Expand Down

0 comments on commit b6a0163

Please sign in to comment.