1
- name : Stable tests
2
-
3
- # This file tests the claimed support range of nipype including
4
- #
5
- # * Operating systems: Linux, OSX
6
- # * Dependencies: minimum requirements, optional requirements
7
- # * Installation methods: setup.py, sdist, wheel, archive
1
+ name : Tox
8
2
9
3
on :
10
4
push :
11
- branches :
12
- - master
13
- - maint/*
14
- tags :
15
- - " *"
5
+ branches : [ master, main, 'maint/*' ]
6
+ tags : [ '*' ]
16
7
pull_request :
17
- branches :
18
- - master
19
- - maint/*
8
+ branches : [ master, main, 'maint/*' ]
20
9
schedule :
21
10
# 8am EST / 9am EDT Mondays
22
11
- cron : " 0 13 * * 1"
@@ -26,27 +15,28 @@ defaults:
26
15
shell : bash
27
16
28
17
concurrency :
29
- group : tests -${{ github.ref }}
18
+ group : ${{ github.workflow }} -${{ github.ref }}
30
19
cancel-in-progress : true
31
20
32
- permissions : {}
21
+ permissions :
22
+ contents : read
23
+
24
+ env :
25
+ # Force tox and pytest to use color
26
+ FORCE_COLOR : true
27
+
28
+
33
29
jobs :
34
30
build :
35
- permissions :
36
- contents : read # to fetch code (actions/checkout)
37
-
38
31
runs-on : ubuntu-latest
39
32
steps :
40
33
- uses : actions/checkout@v4
41
34
with :
42
35
fetch-depth : 0
43
- - uses : actions/setup-python@v5
44
- with :
45
- python-version : 3
46
- - run : pip install --upgrade build twine
47
- - name : Build sdist and wheel
48
- run : python -m build
49
- - run : twine check dist/*
36
+ - name : Install the latest version of uv
37
+ uses : astral-sh/setup-uv@v5
38
+ - run : uv build
39
+ - run : uvx twine check dist/*
50
40
- uses : actions/upload-artifact@v4
51
41
with :
52
42
name : dist
@@ -82,72 +72,52 @@ jobs:
82
72
- name : Run tests
83
73
run : pytest --doctest-modules -v --pyargs nipype
84
74
85
- stable :
75
+ test :
86
76
# Check each OS, all supported Python, minimum versions and latest releases
87
- permissions :
88
- contents : read # to fetch code (actions/checkout)
89
-
90
77
runs-on : ${{ matrix.os }}
91
78
strategy :
92
79
matrix :
93
- os : ["ubuntu-22.04"]
94
- python-version : ["3.8", "3.9", "3.10", "3.11", "3.12"]
95
- check : ["test"]
96
- pip-flags : [""]
97
- depends : ["REQUIREMENTS"]
98
- deb-depends : [false]
99
- nipype-extras : ["doc,tests,profiler"]
80
+ os : ["ubuntu-latest"]
81
+ python-version : ["3.9", "3.10", "3.11", "3.12", "3.13"]
82
+ dependencies : [none, full, pre]
100
83
include :
101
- - os : ubuntu-22.04
102
- python-version : " 3.8"
103
- check : test
104
- pip-flags : " "
105
- depends : REQUIREMENTS
106
- deb-depends : true
107
- nipype-extras : doc,tests,profiler,duecredit,ssh
108
- - os : ubuntu-20.04
109
- python-version : 3.8
110
- check : test
111
- pip-flags : " "
112
- depends : REQUIREMENTS
113
- deb-depends : true
114
- nipype-extras : doc,tests,nipy,profiler,duecredit,ssh
84
+ - os : ubuntu-latest
85
+ python-version : " 3.9"
86
+ dependencies : min
87
+ exclude :
88
+ # Skip some intermediate versions for full tests
89
+ - python-version : " 3.10"
90
+ dependencies : full
91
+ - python-version : " 3.11"
92
+ dependencies : full
93
+ # Do not test pre-releases for versions out of SPEC0
94
+ - python-version : " 3.9"
95
+ dependencies : pre
96
+ - python-version : " 3.10"
97
+ dependencies : pre
98
+
115
99
env :
116
- DEPENDS : ${{ matrix.depends }}
117
- CHECK_TYPE : ${{ matrix.check }}
118
- EXTRA_PIP_FLAGS : ${{ matrix.pip-flags }}
119
- INSTALL_DEB_DEPENDENCIES : ${{ matrix.deb-depends }}
120
- NIPYPE_EXTRAS : ${{ matrix.nipype-extras }}
121
- INSTALL_TYPE : pip
122
- CI_SKIP_TEST : 1
100
+ DEPENDS : ${{ matrix.dependencies }}
123
101
124
102
steps :
125
103
- uses : actions/checkout@v4
104
+ - name : Install the latest version of uv
105
+ uses : astral-sh/setup-uv@v5
126
106
- name : Set up Python ${{ matrix.python-version }}
127
107
uses : actions/setup-python@v5
128
108
with :
129
109
python-version : ${{ matrix.python-version }}
130
110
- name : Display Python version
131
111
run : python -c "import sys; print(sys.version)"
132
- - name : Create virtual environment
133
- run : tools/ci/create_venv.sh
134
- - name : Build archive
112
+ - name : Install tox
135
113
run : |
136
- source tools/ci/build_archive.sh
137
- echo "ARCHIVE=$ARCHIVE" >> $GITHUB_ENV
138
- - name : Install Debian dependencies
139
- run : tools/ci/install_deb_dependencies.sh
140
- if : ${{ matrix.os == 'ubuntu-latest' }}
141
- - name : Install dependencies
142
- run : tools/ci/install_dependencies.sh
143
- - name : Install Nipype
144
- run : tools/ci/install.sh
145
- - name : Run tests
146
- run : tools/ci/check.sh
147
- if : ${{ matrix.check != 'skiptests' }}
148
- - uses : codecov/codecov-action@v4
114
+ uv tool install tox --with=tox-uv --with=tox-gh-actions
115
+ - name : Show tox config
116
+ run : tox c
117
+ - name : Run tox
118
+ run : tox -v --exit-and-dump-after 1200
119
+ - uses : codecov/codecov-action@v5
149
120
with :
150
- file : coverage.xml
151
121
token : ${{ secrets.CODECOV_TOKEN }}
152
122
if : ${{ always() }}
153
123
- name : Upload pytest test results
@@ -160,7 +130,7 @@ jobs:
160
130
publish :
161
131
runs-on : ubuntu-latest
162
132
environment : " Package deployment"
163
- needs : [stable , test-package]
133
+ needs : [test , test-package]
164
134
if : github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
165
135
steps :
166
136
- uses : actions/download-artifact@v4
@@ -171,3 +141,21 @@ jobs:
171
141
with :
172
142
user : __token__
173
143
password : ${{ secrets.PYPI_API_TOKEN }}
144
+
145
+ checks :
146
+ runs-on : ' ubuntu-latest'
147
+ continue-on-error : true
148
+ strategy :
149
+ matrix :
150
+ check : ['specs', 'style']
151
+
152
+ steps :
153
+ - uses : actions/checkout@v4
154
+ - name : Install the latest version of uv
155
+ uses : astral-sh/setup-uv@v5
156
+ - name : Show tox config
157
+ run : uvx tox c
158
+ - name : Show tox config (this call)
159
+ run : uvx tox c -e ${{ matrix.check }}
160
+ - name : Run check
161
+ run : uvx tox -e ${{ matrix.check }}
0 commit comments