@@ -22,43 +22,51 @@ jobs:
22
22
# run all tests even if e.g. image tests fail early
23
23
fail-fast : false
24
24
matrix :
25
- os : [
26
- macos-latest,
27
- windows-latest,
28
- ubuntu-latest,
29
- ]
25
+ os :
26
+ - ubuntu-latest
27
+ - macos-latest
30
28
python-version : ['3.12']
31
29
dependencies : [full]
32
30
tests-type : [unit]
33
31
test-runner : [pytest]
32
+ venv-loc : [bin]
34
33
include :
34
+ - os : windows-latest
35
+ python-version : ' 3.12'
36
+ dependencies : full
37
+ tests-type : unit
38
+ test-runner : pytest
39
+ venv-loc : Scripts
35
40
- os : ubuntu-20.04
36
- python-version : ' 3.9.2 '
41
+ python-version : ' 3.10.3 '
37
42
dependencies : minimal
38
43
tests-type : unit
39
44
test-runner : pytest
45
+ venv-loc : bin
40
46
- os : ubuntu-latest
41
47
# this job is necessary for non-answer, 'yield' based tests
42
- # because pytest doesn't support such tests, and nose is not
43
- # compatible with Python 3.10
44
- python-version : ' 3.9'
48
+ # because pytest doesn't support such tests
49
+ python-version : ' 3.10'
45
50
dependencies : full
46
51
tests-type : unit
47
52
test-runner : nose
53
+ venv-loc : bin
48
54
- os : ubuntu-latest
49
55
# answer tests use 'yield', so they require nose
50
56
# they are also attached to a specific, occasionally updated, Python version
51
57
# but it does *not* have to match the current minimal supported version
52
- python-version : ' 3.9 '
58
+ python-version : ' 3.10 '
53
59
dependencies : full
54
60
tests-type : answer
55
61
test-runner : nose
62
+ venv-loc : bin
56
63
- os : ubuntu-latest
57
64
# minimal tests with latest Python and no optional dependencies
58
65
python-version : ' 3.x'
59
66
dependencies : ' '
60
67
tests-type : unit
61
68
test-runner : pytest
69
+ venv-loc : bin
62
70
63
71
runs-on : ${{ matrix.os }}
64
72
@@ -84,15 +92,34 @@ jobs:
84
92
shell : bash
85
93
env :
86
94
dependencies : ${{ matrix.dependencies }}
87
- run : source ./tests/ci_install.sh
95
+ run : |
96
+ python -m venv .venv
97
+ source .venv/${{matrix.venv-loc}}/activate
98
+ source ./tests/ci_install.sh
99
+
100
+ - name : Install and patch nosetest
101
+ if : matrix.test-runner == 'nose'
102
+ run : |
103
+ source .venv/${{matrix.venv-loc}}/activate
104
+ python -m pip install -r nose_requirements.txt
105
+ find .venv/lib/python${{matrix.python-version}}/site-packages/nose -name '*.py' \
106
+ -exec sed -i -e s/collections.Callable/collections.abc.Callable/g '{}' ';'
107
+
108
+ - name : Show final env
109
+ run : |
110
+ source .venv/${{matrix.venv-loc}}/activate
111
+ python -m pip list
88
112
89
- - run : python -m pip list
90
113
- name : Run Unit Tests (pytest)
91
114
if : matrix.test-runner == 'pytest'
92
- run : pytest --color=yes
115
+ run : |
116
+ source .venv/${{matrix.venv-loc}}/activate
117
+ pytest --color=yes
93
118
- name : Run Tests (nose)
94
119
if : matrix.test-runner == 'nose'
95
- run : cat nose_ignores.txt | xargs python -m nose -c nose_unit.cfg --traverse-namespace
120
+ run : |
121
+ source .venv/${{matrix.venv-loc}}/activate
122
+ cat nose_ignores.txt | xargs python -m nose -c nose_unit.cfg --traverse-namespace
96
123
97
124
image-tests :
98
125
name : Image tests
0 commit comments