15
15
- name : Set up Python
16
16
uses : actions/setup-python@v4
17
17
with :
18
- python-version : 3.7.14
18
+ python-version : 3.11
19
19
20
20
- name : Upgrade pip
21
21
run : python -m pip install --upgrade pip
@@ -39,20 +39,14 @@ jobs:
39
39
strategy :
40
40
fail-fast : false
41
41
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"]
44
43
os : [macos-11, macos-12, ubuntu-20.04, ubuntu-22.04, windows-2019, windows-2022]
45
44
exclude :
46
45
# temporarily exclude pypy3 on mac-os as there failing tests caused by bug on cbc side
47
46
- os : macos-11
48
- python-version : " pypy3.9-v7.3.9 "
47
+ python-version : " pypy3.9-v7.3.15 "
49
48
- 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"
56
50
57
51
steps :
58
52
@@ -63,41 +57,27 @@ jobs:
63
57
with :
64
58
python-version : ${{ matrix.python-version }}
65
59
architecture : x64
60
+ cache : ' pip'
66
61
67
62
- name : Check python version
68
63
run : python -c "import sys; import platform; print('Python %s implementation %s on %s' % (sys.version, platform.python_implementation(), sys.platform))"
69
64
70
65
- name : Upgrade pip
71
66
run : python -m pip install --upgrade pip
72
67
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]
77
70
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]
87
74
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]
91
78
92
79
- name : list installed packages
93
80
run : python -m pip list
94
81
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
-
100
82
- 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