Skip to content

Commit 765ff64

Browse files
Specify test dependencies in requirements.txt files (#1094)
* Specify test dependencies in requirements.txt files * Set SCIP version to 9.2.3 in all workflows * Add workflow_dispatch for integration tests * Trigger integration tests in the fork * Revert "Trigger integration tests in the fork" This reverts commit bef9b10. --------- Co-authored-by: João Dionísio <57299939+Joao-Dionisio@users.noreply.github.com>
1 parent b26b939 commit 765ff64

File tree

9 files changed

+35
-47
lines changed

9 files changed

+35
-47
lines changed

.github/workflows/coverage.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Run tests with coverage
22
env:
3-
version: 9.2.1
3+
version: 9.2.3
44

55
on:
66
push:
@@ -25,8 +25,8 @@ jobs:
2525

2626
- name: Install dependencies (SCIPOptSuite)
2727
run: |
28-
wget --quiet --no-check-certificate https://github.com/scipopt/scip/releases/download/$(echo "v${{env.version}}" | tr -d '.')/SCIPOptSuite-${{ env.version }}-Linux-ubuntu20.deb
29-
sudo apt-get update && sudo apt install -y ./SCIPOptSuite-${{ env.version }}-Linux-ubuntu20.deb
28+
wget --quiet --no-check-certificate https://github.com/scipopt/scip/releases/download/$(echo "v${{env.version}}" | tr -d '.')/SCIPOptSuite-${{ env.version }}-Linux-ubuntu22.deb
29+
sudo apt-get update && sudo apt install -y ./SCIPOptSuite-${{ env.version }}-Linux-ubuntu22.deb
3030
3131
- name: Setup python ${{ matrix.python-version }}
3232
uses: actions/setup-python@v4
@@ -36,7 +36,7 @@ jobs:
3636
- name: Prepare python environment
3737
run: |
3838
python -m pip install --upgrade pip
39-
python -m pip install ".[coverage]"
39+
python -m pip install -r requirements/coverage.txt
4040
4141
- name: Install PySCIPOpt
4242
run: |

.github/workflows/integration-test.yml

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Integration test
22

33
env:
4-
version: 9.2.0
4+
version: 9.2.3
55

66
on:
77
push:
@@ -17,14 +17,14 @@ jobs:
1717
strategy:
1818
fail-fast: true
1919
matrix:
20-
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
20+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
2121
steps:
2222
- uses: actions/checkout@v3
2323

2424
- name: Install dependencies (SCIPOptSuite)
2525
run: |
26-
wget --quiet --no-check-certificate https://github.com/scipopt/scip/releases/download/$(echo "v${{env.version}}" | tr -d '.')/SCIPOptSuite-${{ env.version }}-Linux-ubuntu20.deb
27-
sudo apt-get update && sudo apt install -y ./SCIPOptSuite-${{ env.version }}-Linux-ubuntu20.deb
26+
wget --quiet --no-check-certificate https://github.com/scipopt/scip/releases/download/$(echo "v${{env.version}}" | tr -d '.')/SCIPOptSuite-${{ env.version }}-Linux-ubuntu22.deb
27+
sudo apt-get update && sudo apt install -y ./SCIPOptSuite-${{ env.version }}-Linux-ubuntu22.deb
2828
2929
- name: Setup python ${{ matrix.python-version }}
3030
uses: actions/setup-python@v4
@@ -34,22 +34,21 @@ jobs:
3434
- name: Prepare python environment
3535
run: |
3636
python -m pip install --upgrade pip
37-
python -m pip install ".[test]"
37+
python -m pip install -r requirements/test.txt
3838
3939
- name: Install PySCIPOpt
4040
run: python -m pip install .
4141

4242
- name: Run pyscipopt tests
43-
run: |
44-
py.test -nauto
43+
run: pytest -nauto
4544

4645
Windows-test:
4746
env:
4847
SCIPOPTDIR: C:\scipoptdir
4948
runs-on: windows-latest
5049
strategy:
5150
matrix:
52-
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
51+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
5352
steps:
5453
- uses: actions/checkout@v3
5554

@@ -70,7 +69,7 @@ jobs:
7069
shell: powershell
7170
run: |
7271
python -m pip install --upgrade pip
73-
python -m pip install ".[test]"
72+
python -m pip install -r requirements/test.txt
7473
7574
- name: Install PySCIPOpt
7675
shell: powershell
@@ -80,14 +79,13 @@ jobs:
8079
8180
- name: Run pyscipopt tests
8281
shell: powershell
83-
run: |
84-
py.test -nauto
82+
run: pytest -nauto
8583

8684
MacOS-test:
8785
runs-on: macos-latest
8886
strategy:
8987
matrix:
90-
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
88+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
9189
steps:
9290
- uses: actions/checkout@v3
9391

@@ -97,7 +95,7 @@ jobs:
9795
wget --quiet --no-check-certificate https://github.com/scipopt/scip/releases/download/$(echo "v${{env.version}}" | tr -d '.')/SCIPOptSuite-${{ env.version }}-Darwin.sh
9896
chmod +x SCIPOptSuite-${{ env.version }}-Darwin.sh
9997
./SCIPOptSuite-${{ env.version }}-Darwin.sh --skip-license --include-subdir
100-
mv SCIPOptSuite-${{ env.version }}-Darwin ${{ runner.workspace }}/scipoptsuite
98+
mv SCIPOptSuite-${{ env.version }}-Darwin ${{ github.workspace }}/scipoptsuite
10199
102100
- name: Setup python ${{ matrix.python-version }}
103101
uses: actions/setup-python@v4
@@ -107,19 +105,19 @@ jobs:
107105
- name: Prepare python environment
108106
run: |
109107
python -m pip install --upgrade pip
110-
python -m pip install ".[test]"
108+
python -m pip install -r requirements/test.txt
111109
112110
- name: Install PySCIPOpt
113111
run: |
114-
export SCIPOPTDIR=${{ runner.workspace }}/scipoptsuite/
115-
export DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH}:${{ runner.workspace }}/scipoptsuite/lib
112+
export SCIPOPTDIR=${{ github.workspace }}/scipoptsuite/
113+
export DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH}:${{ github.workspace }}/scipoptsuite/lib
116114
python -m pip install .
117115
118116
# - name: Run pyscipopt tests
119117
# run: |
120-
# export SCIPOPTDIR=${{ runner.workspace }}/scipoptsuite/
121-
# export DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH}:${{ runner.workspace }}/scipoptsuite/lib
122-
# py.test
118+
# export SCIPOPTDIR=${{ github.workspace }}/scipoptsuite/
119+
# export DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH}:${{ github.workspace }}/scipoptsuite/lib
120+
# pytest
123121

124122
### if you need valgrind on mac, you can install it via
125123
# brew tap LouisBrunner/valgrind

.github/workflows/test-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: TestPyPI release
22

33
env:
4-
version: 9.0.0
4+
version: 9.2.3
55

66

77
# runs only when a release is published, not on drafts

.github/workflows/update-packages-and-documentation.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Test and Release PyPI Package
22

33
env:
4-
version: 9.0.0
4+
version: 9.2.3
55

66

77
# runs only when a release is published, not on drafts
@@ -49,7 +49,7 @@ jobs:
4949
- name: Prepare python environment
5050
run: |
5151
python -m pip install --upgrade pip
52-
python -m pip install ".[test]"
52+
python -m pip install -r requirements/test.txt
5353
5454
- name: Install PySCIPOpt
5555
run: python -m pip install .
@@ -86,7 +86,7 @@ jobs:
8686
shell: powershell
8787
run: |
8888
python -m pip install --upgrade pip
89-
python -m pip install ".[test]"
89+
python -m pip install -r requirements/test.txt
9090
9191
- name: Install PySCIPOpt
9292
shell: powershell

INSTALL.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,10 +116,9 @@ Testing new installation
116116
========================
117117

118118
To test your brand-new installation of PySCIPOpt you need
119-
some dependencies which can be installed via pip. The testing
120-
dependencies are in the `test` extra.
119+
some dependencies which can be installed via pip.
121120

122-
pip install ".[test]"
121+
pip install -r requirements/test.txt
123122

124123
Tests can be run in the `PySCIPOpt` directory with: :
125124

docs/build.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,12 +178,11 @@ Testing the Installation
178178
==========================
179179

180180
To test your brand-new installation of PySCIPOpt you need to
181-
install some dependencies via pip. The testing dependencies are in
182-
the `test` extra.
181+
install some dependencies.
183182

184183
.. code-block:: bash
185184
186-
pip install ".[test]"
185+
pip install -r requirements/test.txt
187186
188187
Tests can be run in the PySCIPOpt directory with the commands:
189188

pyproject.toml

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -26,20 +26,6 @@ dynamic = ["version"]
2626
[project.urls]
2727
Homepage = "https://github.com/SCIP-Interfaces/PySCIPOpt"
2828

29-
[project.optional-dependencies]
30-
test = [
31-
"pytest",
32-
"pytest-xdist",
33-
"networkx", # only needed for a few tests
34-
]
35-
coverage = [
36-
"pytest",
37-
"pytest-xdist",
38-
"networkx",
39-
"coverage",
40-
"cython",
41-
]
42-
4329
[tool.pytest.ini_options]
4430
norecursedirs = ["check"]
4531
testpaths = ["tests"]

requirements/coverage.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
-r ./test.txt
2+
coverage>=7
3+
cython>=3

requirements/test.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
pytest>=8
2+
pytest-xdist>=3
3+
networkx>=3 # only needed for a few tests

0 commit comments

Comments
 (0)