@@ -24,6 +24,13 @@ defaults:
24
24
run :
25
25
shell : bash
26
26
27
+ concurrency :
28
+ group : ${{ github.workflow }}-${{ github.ref }}
29
+ cancel-in-progress : true
30
+
31
+ permissions :
32
+ contents : read
33
+
27
34
jobs :
28
35
build :
29
36
runs-on : ubuntu-latest
@@ -39,11 +46,17 @@ jobs:
39
46
run : python -m build
40
47
- run : twine check dist/*
41
48
- name : Build git archive
42
- run : git archive -v -o dist/nibabel-archive.tgz HEAD
43
- - uses : actions/upload-artifact@v3
49
+ run : mkdir archive && git archive -v -o archive/nibabel-archive.tgz HEAD
50
+ - name : Upload sdist and wheel artifacts
51
+ uses : actions/upload-artifact@v3
44
52
with :
45
53
name : dist
46
54
path : dist/
55
+ - name : Upload git archive artifact
56
+ uses : actions/upload-artifact@v3
57
+ with :
58
+ name : archive
59
+ path : archive/
47
60
48
61
test-package :
49
62
runs-on : ubuntu-latest
@@ -52,10 +65,18 @@ jobs:
52
65
matrix :
53
66
package : ['wheel', 'sdist', 'archive']
54
67
steps :
55
- - uses : actions/download-artifact@v3
68
+ - name : Download sdist and wheel artifacts
69
+ if : matrix.package != 'archive'
70
+ uses : actions/download-artifact@v3
56
71
with :
57
72
name : dist
58
73
path : dist/
74
+ - name : Download git archive artifact
75
+ if : matrix.package == 'archive'
76
+ uses : actions/download-artifact@v3
77
+ with :
78
+ name : archive
79
+ path : archive/
59
80
- uses : actions/setup-python@v4
60
81
with :
61
82
python-version : 3
@@ -64,14 +85,14 @@ jobs:
64
85
- name : Update pip
65
86
run : pip install --upgrade pip
66
87
- name : Install wheel
67
- run : pip install dist/nibabel-*.whl
68
88
if : matrix.package == 'wheel'
89
+ run : pip install dist/nibabel-*.whl
69
90
- name : Install sdist
70
- run : pip install dist/nibabel-*.tar.gz
71
91
if : matrix.package == 'sdist'
92
+ run : pip install dist/nibabel-*.tar.gz
72
93
- name : Install archive
73
- run : pip install dist/nibabel-archive.tgz
74
94
if : matrix.package == 'archive'
95
+ run : pip install archive/nibabel-archive.tgz
75
96
- run : python -c 'import nibabel; print(nibabel.__version__)'
76
97
- name : Install test extras
77
98
run : pip install nibabel[test]
84
105
strategy :
85
106
matrix :
86
107
os : ['ubuntu-latest', 'windows-latest', 'macos-latest']
87
- python-version : [3.7 , 3.8, 3.9 , "3.10 "]
108
+ python-version : [3.8 , 3.9, "3.10" , "3.11 "]
88
109
architecture : ['x64', 'x86']
89
110
install : ['pip']
90
111
check : ['test']
@@ -94,31 +115,31 @@ jobs:
94
115
include :
95
116
# Basic dependencies only
96
117
- os : ubuntu-latest
97
- python-version : 3.7
118
+ python-version : 3.8
98
119
install : pip
99
120
check : test
100
121
pip-flags : ' '
101
122
depends : REQUIREMENTS
102
123
optional-depends : ' '
103
124
# Absolute minimum dependencies
104
125
- os : ubuntu-latest
105
- python-version : 3.7
126
+ python-version : 3.8
106
127
install : pip
107
128
check : test
108
129
pip-flags : ' '
109
130
depends : MIN_REQUIREMENTS
110
131
optional-depends : ' '
111
132
# Absolute minimum dependencies plus old MPL, Pydicom, Pillow
112
133
- os : ubuntu-latest
113
- python-version : 3.7
134
+ python-version : 3.8
114
135
install : pip
115
136
check : test
116
137
pip-flags : ' '
117
138
depends : MIN_REQUIREMENTS
118
139
optional-depends : MIN_OPT_DEPENDS
119
140
# Clean install imports only with package-declared dependencies
120
141
- os : ubuntu-latest
121
- python-version : 3.7
142
+ python-version : 3.8
122
143
install : pip
123
144
check : skiptests
124
145
pip-flags : ' '
@@ -158,17 +179,18 @@ jobs:
158
179
- name : Install NiBabel
159
180
run : tools/ci/install.sh
160
181
- name : Run tests
161
- run : tools/ci/check.sh
162
182
if : ${{ matrix.check != 'skiptests' }}
163
- - name : Submit coverage
164
- run : tools/ci/submit_coverage.sh
183
+ run : tools/ci/check.sh
184
+ - uses : codecov/codecov-action@v3
165
185
if : ${{ always() }}
186
+ with :
187
+ files : cov.xml
166
188
- name : Upload pytest test results
189
+ if : ${{ always() && matrix.check == 'test' }}
167
190
uses : actions/upload-artifact@v3
168
191
with :
169
192
name : pytest-results-${{ matrix.os }}-${{ matrix.python-version }}
170
193
path : for_testing/test-results.xml
171
- if : ${{ always() && matrix.check == 'test' }}
172
194
173
195
publish :
174
196
runs-on : ubuntu-latest
0 commit comments