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
82
93on :
104 push :
11- branches :
12- - master
13- - maint/*
14- tags :
15- - " *"
5+ branches : [ master, main, 'maint/*' ]
6+ tags : [ '*' ]
167 pull_request :
17- branches :
18- - master
19- - maint/*
8+ branches : [ master, main, 'maint/*' ]
209 schedule :
2110 # 8am EST / 9am EDT Mondays
2211 - cron : " 0 13 * * 1"
@@ -26,27 +15,28 @@ defaults:
2615 shell : bash
2716
2817concurrency :
29- group : tests -${{ github.ref }}
18+ group : ${{ github.workflow }} -${{ github.ref }}
3019 cancel-in-progress : true
3120
32- permissions : {}
21+ permissions :
22+ contents : read
23+ 24+ env :
25+ # Force tox and pytest to use color
26+ FORCE_COLOR : true
27+ 28+ 3329jobs :
3430 build :
35- permissions :
36- contents : read # to fetch code (actions/checkout)
37- 3831 runs-on : ubuntu-latest
3932 steps :
4033 - uses : actions/checkout@v4
4134 with :
4235 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@v3
38+ - run : uv build
39+ - run : uvx twine check dist/*
5040 - uses : actions/upload-artifact@v4
5141 with :
5242 name : dist
@@ -82,70 +72,51 @@ jobs:
8272 - name : Run tests
8373 run : pytest --doctest-modules -v --pyargs nipype
8474
85- stable :
75+ test :
8676 # Check each OS, all supported Python, minimum versions and latest releases
87- permissions :
88- contents : read # to fetch code (actions/checkout)
89- 9077 runs-on : ${{ matrix.os }}
9178 strategy :
9279 matrix :
93- os : ["ubuntu-22.04"]
94- python-version : ["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]
10083 include :
101- - os : ubuntu-22.04
84+ - os : ubuntu-latest
10285 python-version : " 3.9"
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.9"
110- check : test
111- pip-flags : " "
112- depends : REQUIREMENTS
113- deb-depends : true
114- nipype-extras : doc,tests,nipy,profiler,duecredit,ssh
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+ 11599 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 }}
123101
124102 steps :
125103 - uses : actions/checkout@v4
104+ - name : Install the latest version of uv
105+ uses : astral-sh/setup-uv@v3
126106 - name : Set up Python ${{ matrix.python-version }}
127107 uses : actions/setup-python@v5
128108 with :
129109 python-version : ${{ matrix.python-version }}
130110 - name : Display Python version
131111 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
135113 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@v5
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@v4
149120 with :
150121 token : ${{ secrets.CODECOV_TOKEN }}
151122 if : ${{ always() }}
@@ -159,7 +130,7 @@ jobs:
159130 publish :
160131 runs-on : ubuntu-latest
161132 environment : " Package deployment"
162- needs : [stable , test-package]
133+ needs : [test , test-package]
163134 if : github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
164135 steps :
165136 - uses : actions/download-artifact@v4
@@ -170,3 +141,21 @@ jobs:
170141 with :
171142 user : __token__
172143 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@v3
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