@@ -46,11 +46,17 @@ jobs:
46
46
run : python -m build
47
47
- run : twine check dist/*
48
48
- name : Build git archive
49
- run : git archive -v -o dist/nibabel-archive.tgz HEAD
50
- - 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
51
52
with :
52
53
name : dist
53
54
path : dist/
55
+ - name : Upload git archive artifact
56
+ uses : actions/upload-artifact@v3
57
+ with :
58
+ name : archive
59
+ path : archive/
54
60
55
61
test-package :
56
62
runs-on : ubuntu-latest
@@ -59,10 +65,18 @@ jobs:
59
65
matrix :
60
66
package : ['wheel', 'sdist', 'archive']
61
67
steps :
62
- - uses : actions/download-artifact@v3
68
+ - name : Download sdist and wheel artifacts
69
+ if : matrix.package != 'archive'
70
+ uses : actions/download-artifact@v3
63
71
with :
64
72
name : dist
65
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/
66
80
- uses : actions/setup-python@v4
67
81
with :
68
82
python-version : 3
@@ -71,14 +85,14 @@ jobs:
71
85
- name : Update pip
72
86
run : pip install --upgrade pip
73
87
- name : Install wheel
74
- run : pip install dist/nibabel-*.whl
75
88
if : matrix.package == 'wheel'
89
+ run : pip install dist/nibabel-*.whl
76
90
- name : Install sdist
77
- run : pip install dist/nibabel-*.tar.gz
78
91
if : matrix.package == 'sdist'
92
+ run : pip install dist/nibabel-*.tar.gz
79
93
- name : Install archive
80
- run : pip install dist/nibabel-archive.tgz
81
94
if : matrix.package == 'archive'
95
+ run : pip install archive/nibabel-archive.tgz
82
96
- run : python -c 'import nibabel; print(nibabel.__version__)'
83
97
- name : Install test extras
84
98
run : pip install nibabel[test]
@@ -165,17 +179,17 @@ jobs:
165
179
- name : Install NiBabel
166
180
run : tools/ci/install.sh
167
181
- name : Run tests
168
- run : tools/ci/check.sh
169
182
if : ${{ matrix.check != 'skiptests' }}
183
+ run : tools/ci/check.sh
170
184
- name : Submit coverage
171
- run : tools/ci/submit_coverage.sh
172
185
if : ${{ always() }}
186
+ run : tools/ci/submit_coverage.sh
173
187
- name : Upload pytest test results
188
+ if : ${{ always() && matrix.check == 'test' }}
174
189
uses : actions/upload-artifact@v3
175
190
with :
176
191
name : pytest-results-${{ matrix.os }}-${{ matrix.python-version }}
177
192
path : for_testing/test-results.xml
178
- if : ${{ always() && matrix.check == 'test' }}
179
193
180
194
publish :
181
195
runs-on : ubuntu-latest
0 commit comments