5
5
test :
6
6
strategy :
7
7
matrix :
8
- python_version : ['2.7 ', '3.10 ']
8
+ python_version : ['3.10 ', '3.12 ']
9
9
os : [ubuntu-latest]
10
+ include :
11
+ - python_version : ' 2.7'
12
+ os : ubuntu-22.04
10
13
runs-on : ${{ matrix.os }}
11
14
timeout-minutes : 30
12
15
steps :
@@ -21,23 +24,30 @@ jobs:
21
24
22
25
- name : Install RPyC for gdb
23
26
run : |
24
- # The version packaged in python3-rpyc is too old on Ubuntu 22.04
27
+ # The version packaged in python3-rpyc is too old on Ubuntu 24.04
28
+ # We use ^6.0 from pip.
25
29
sudo apt-get update && sudo apt-get install -y python3-pip gdb gdbserver
26
- /usr/bin/python -m pip install rpyc
30
+ /usr/bin/python -m pip install --break-system-packages rpyc || /usr/bin/python -m pip install rpyc
27
31
gdb --batch --quiet --nx --nh --ex 'py import rpyc; print(rpyc.version.version)'
28
32
29
33
- name : Cache for pip
30
34
uses : actions/cache@v4
35
+ if : matrix.python_version == '2.7'
31
36
id : cache-pip
32
37
with :
33
38
path : ~/.cache/pip
34
- key : ${{ matrix.os }}-cache-pip
39
+ key : ${{ matrix.os }}-${{ matrix.python_version }}-cache-pip-${{ hashFiles('**/pyproject.toml', '**/requirements*.txt') }}
40
+ restore-keys : ${{ matrix.os }}-${{ matrix.python_version }}-cache-pip-
35
41
36
42
- name : Set up Python ${{ matrix.python_version }}
37
43
if : matrix.python_version != '2.7'
38
44
uses : actions/setup-python@v5
39
45
with :
40
46
python-version : ${{ matrix.python_version }}
47
+ cache : ' pip'
48
+ cache-dependency-path : |
49
+ **/pyproject.toml
50
+ **/requirements*.txt
41
51
42
52
- name : Set up Python 2.7
43
53
if : matrix.python_version == '2.7'
@@ -203,7 +213,7 @@ jobs:
203
213
python -m build
204
214
205
215
- uses : actions/upload-artifact@v4
206
- if : matrix.python_version != '2.7 '
216
+ if : matrix.python_version == '3.10 '
207
217
with :
208
218
name : packages
209
219
path : dist/
@@ -252,7 +262,7 @@ jobs:
252
262
253
263
- name : Install coveralls
254
264
run : |
255
- pip install tomli coveralls
265
+ pip install --break-system-packages tomli coveralls
256
266
257
267
- name : Upload coverage to coveralls.io
258
268
run : |
0 commit comments