94
94
if : matrix.package == 'archive'
95
95
run : pip install archive/nibabel-archive.tgz
96
96
- run : python -c 'import nibabel; print(nibabel.__version__)'
97
- - name : Install test extras
98
- run : pip install nibabel[test]
97
+ - name : Install minimum test dependencies
98
+ run : pip install pytest pytest-doctest-plus
99
99
- name : Run tests
100
100
run : pytest --doctest-modules --doctest-plus -v --pyargs nibabel
101
101
@@ -107,57 +107,24 @@ jobs:
107
107
os : ['ubuntu-latest', 'windows-latest', 'macos-latest']
108
108
python-version : [3.8, 3.9, "3.10", "3.11", "3.12"]
109
109
architecture : ['x64', 'x86']
110
- install : ['pip']
111
- check : ['test']
112
- pip-flags : ['']
113
- depends : ['REQUIREMENTS']
114
- optional-depends : ['DEFAULT_OPT_DEPENDS']
110
+ dependencies : ['full']
115
111
include :
116
112
# Basic dependencies only
117
113
- os : ubuntu-latest
118
114
python-version : 3.8
119
- install : pip
120
- check : test
121
- pip-flags : ' '
122
- depends : REQUIREMENTS
123
- optional-depends : ' '
115
+ dependencies : ' '
124
116
# Absolute minimum dependencies
125
117
- os : ubuntu-latest
126
118
python-version : 3.8
127
- install : pip
128
- check : test
129
- pip-flags : ' '
130
- depends : MIN_REQUIREMENTS
131
- optional-depends : ' '
132
- # Absolute minimum dependencies plus old MPL, Pydicom, Pillow
133
- - os : ubuntu-latest
134
- python-version : 3.8
135
- install : pip
136
- check : test
137
- pip-flags : ' '
138
- depends : MIN_REQUIREMENTS
139
- optional-depends : MIN_OPT_DEPENDS
140
- # Clean install imports only with package-declared dependencies
141
- - os : ubuntu-latest
142
- python-version : 3.8
143
- install : pip
144
- check : skiptests
145
- pip-flags : ' '
146
- depends : ' '
119
+ dependencies : ' min'
147
120
exclude :
148
121
- os : ubuntu-latest
149
122
architecture : x86
150
123
- os : macos-latest
151
124
architecture : x86
152
- env :
153
- DEPENDS : ${{ matrix.depends }}
154
- OPTIONAL_DEPENDS : ${{ matrix.optional-depends }}
155
- INSTALL_TYPE : ${{ matrix.install }}
156
- CHECK_TYPE : ${{ matrix.check }}
157
- EXTRA_PIP_FLAGS : ${{ matrix.pip-flags }}
158
125
159
126
steps :
160
- - uses : actions/checkout@v4
127
+ - uses : actions/checkout@v3
161
128
with :
162
129
submodules : recursive
163
130
fetch-depth : 0
@@ -166,31 +133,27 @@ jobs:
166
133
with :
167
134
python-version : ${{ matrix.python-version }}
168
135
architecture : ${{ matrix.architecture }}
136
+ allow-prereleases : true
169
137
- name : Display Python version
170
138
run : python -c "import sys; print(sys.version)"
171
- - name : Create virtual environment
172
- run : tools/ci/create_venv.sh
173
- - name : Build archive
139
+ - name : Install tox
174
140
run : |
175
- source tools/ci/build_archive.sh
176
- echo "ARCHIVE=$ARCHIVE" >> $GITHUB_ENV
177
- - name : Install dependencies
178
- run : tools/ci/install_dependencies.sh
179
- - name : Install NiBabel
180
- run : tools/ci/install.sh
181
- - name : Run tests
182
- if : ${{ matrix.check != 'skiptests' }}
183
- run : tools/ci/check.sh
141
+ python -m pip install --upgrade pip
142
+ python -m pip install tox tox-gh-actions
143
+ - name : Run tox
144
+ run : tox
145
+ env :
146
+ DEPENDS : ${{ matrix.dependencies }}
184
147
- uses : codecov/codecov-action@v3
185
148
if : ${{ always() }}
186
149
with :
187
150
files : cov.xml
188
151
- name : Upload pytest test results
189
- if : ${{ always() && matrix.check == 'test' }}
190
152
uses : actions/upload-artifact@v3
191
153
with :
192
154
name : pytest-results-${{ matrix.os }}-${{ matrix.python-version }}
193
- path : for_testing/test-results.xml
155
+ path : test-results.xml
156
+ if : ${{ always() }}
194
157
195
158
publish :
196
159
runs-on : ubuntu-latest
0 commit comments