1515 - name : Set up Python
1616 uses : actions/setup-python@v4
1717 with :
18- python-version : 3.7.14
18+ python-version : 3.11
1919
2020 - name : Upgrade pip
2121 run : python -m pip install --upgrade pip
@@ -39,20 +39,14 @@ jobs:
3939 strategy :
4040 fail-fast : false
4141 matrix :
42- # temporarily downgraded to 3.7.9 and 3.8.10 due to a bug https://github.com/actions/setup-python/issues/402
43- python-version : ["3.7.9", "3.8.10", "3.9.13", "3.10.9", "3.11.1", "pypy3.9-v7.3.9"]
42+ python-version : ["3.8", "3.9", "3.10", "3.11", "3.12", "pypy3.9-v7.3.15"]
4443 os : [macos-11, macos-12, ubuntu-20.04, ubuntu-22.04, windows-2019, windows-2022]
4544 exclude :
4645 # temporarily exclude pypy3 on mac-os as there failing tests caused by bug on cbc side
4746 - os : macos-11
48- python-version : " pypy3.9-v7.3.9 "
47+ python-version : " pypy3.9-v7.3.15 "
4948 - os : macos-12
50- python-version : " pypy3.9-v7.3.9"
51- # several version (3.7.9 and 3.8.10) at not available at ubuntu-22.04
52- - os : ubuntu-22.04
53- python-version : " 3.7.9"
54- - os : ubuntu-22.04
55- python-version : " 3.8.10"
49+ python-version : " pypy3.9-v7.3.15"
5650
5751 steps :
5852
@@ -63,41 +57,27 @@ jobs:
6357 with :
6458 python-version : ${{ matrix.python-version }}
6559 architecture : x64
60+ cache : ' pip'
6661
6762 - name : Check python version
6863 run : python -c "import sys; import platform; print('Python %s implementation %s on %s' % (sys.version, platform.python_implementation(), sys.platform))"
6964
7065 - name : Upgrade pip
7166 run : python -m pip install --upgrade pip
7267
73- - name : Get pip cache dir
74- id : pip-cache
75- run : |
76- echo "::set-output name=dir::$(pip cache dir)"
68+ - name : Install test and numpy
69+ run : python -m pip install .[test,numpy]
7770
78- - name : pip cache
79- uses : actions/cache@v3
80- with :
81- path : ${{ steps.pip-cache.outputs.dir }}
82- key : ${{ runner.os }}-${{ matrix.python-version }}-pythonpip
83-
84- - name : Install mip for testing (PyPy)
85- if : ${{ matrix.python-version == 'pypy3.9-v7.3.9' }}
86- run : python -m pip install .[test,numpy,highs]
71+ - name : Install gurobi
72+ if : ${{ matrix.python-version != 'pypy3.9-v7.3.15' }}
73+ run : python -m pip install .[gurobi]
8774
88- - name : Install mip for testing (CPython)
89- if : ${{ matrix.python-version != 'pypy3.9-v7. 3.9' }}
90- run : python -m pip install .[test,numpy,gurobi, highs]
75+ - name : Install highs
76+ if : ${{ !contains( matrix.os, 'windows') && !(matrix.os == 'ubuntu-22.04' && matrix.python-version == ' 3.9') }}
77+ run : python -m pip install .[highs]
9178
9279 - name : list installed packages
9380 run : python -m pip list
9481
95- - name : Run tests PyPy
96- if : ${{ matrix.python-version == 'pypy3.9-v7.3.9'}}
97- run : |
98- python -m pytest test --verbose --color=yes --doctest-modules --ignore="test/test_gurobi.py"
99-
10082 - name : Run tests
101- if : ${{ matrix.python-version != 'pypy3.9-v7.3.9'}}
102- run : |
103- python -m pytest test --verbose --color=yes --doctest-modules -Werror
83+ run : python -m pytest test --verbose --color=yes --doctest-modules -Werror
0 commit comments