@@ -2,9 +2,20 @@ name: CI
22
33on :
44 push :
5+ branches :
6+ - master
7+ - main
8+ - maint/*
9+ tags :
10+ - ' *'
511 pull_request :
12+ branches :
13+ - master
14+ - main
15+ - maint/*
616 schedule :
7- - cron : 0 0 * * 0
17+ # 9am EST / 10am EDT Mondays
18+ - cron : 0 14 * * 0
819 # Allow job to be triggered manually from GitHub interface
920 workflow_dispatch :
1021
@@ -49,18 +60,32 @@ jobs:
4960 AFNI_IMSAVE_WARNINGS : NO
5061 AFNI_TTATLAS_DATASET : /opt/afni/atlases
5162 AFNI_PLUGINPATH : /opt/afni/plugins
63+ MARKS : ${{ matrix.marks }}
64+ DEPENDS : ${{ matrix.dependencies }}
5265 strategy :
53- max-parallel : 6
66+ fail-fast : false
5467 matrix :
55- python-version : ["3.9", "3.10", "3.11", "3.12"]
56- marks : ["not slow"]
68+ python-version : ["3.9", "3.10", "3.11", "3.12", "3.13"]
69+ dependencies : ["latest", "pre"]
70+ marks : ["fast"]
5771 include :
5872 - python-version : " 3.9"
59- marks : " slow and not veryslow"
73+ dependencies : " min"
74+ marks : " fast"
75+ - python-version : " 3.9"
76+ dependencies : " latest"
77+ marks : " slow"
6078 - python-version : " 3.12"
79+ dependencies : " latest"
6180 marks : " veryslow"
81+ exclude :
82+ - python-version : " 3.9"
83+ dependencies : " pre"
84+ - python-version : " 3.10"
85+ dependencies : " pre"
6286
6387 steps :
88+ - uses : actions/checkout@v4
6489 - uses : actions/cache@v4
6590 with :
6691 path : /var/lib/apt
@@ -89,18 +114,22 @@ jobs:
89114 curl -O https://afni.nimh.nih.gov/pub/dist/bin/misc/@update.afni.binaries && \
90115 tcsh @update.afni.binaries -package linux_ubuntu_16_64 -bindir ${AFNI_HOME}
91116 fi
117+ ls -l ${AFNI_HOME}
118+ echo "PATH=${AFNI_HOME}:$PATH" | tee -a $GITHUB_ENV
92119
93120 - name : Git settings (pacify DataLad)
94121 run : |
95122 git config --global user.name 'NiPreps Bot'
96123 git config --global user.email '[email protected] ' 124+ - name : Install the latest version of uv
125+ uses : astral-sh/setup-uv@v5
97126 - name : Set up Python ${{ matrix.python-version }}
98127 uses : conda-incubator/setup-miniconda@v3
99128 with :
100129 auto-update-conda : true
101130 auto-activate-base : true
102131 python-version : ${{ matrix.python-version }}
103- channels : https://fsl.fmrib.ox.ac.uk/fsldownloads/fslconda/public/,conda-forge
132+ channels : https://fsl.fmrib.ox.ac.uk/fsldownloads/fslconda/public/,conda-forge,defaults
104133 - uses : actions/cache@v4
105134 id : conda
106135 env :
@@ -110,22 +139,15 @@ jobs:
110139 ~/conda_pkgs_dir
111140 /home/runner/.cache/pip
112141 key : python-${{ matrix.python-version }}-${{ env.CACHE_NUM }}
113- restore-keys : |
114- python-${{ matrix.python-version }}-${{ env.CACHE_NUM }}
115142 - name : Install DataLad
116143 run : |
117- conda install git-annex=*=alldep* pip
118- pip install datalad datalad-osf
144+ conda install git-annex=*=alldep*
145+ uv tool install datalad --with=datalad-next --with=datalad-osf
146+ uv tool install datalad-osf --with=datalad-next
119147 - name : Install fsl and ANTs
120148 run : |
121- conda install fsl-fugue fsl-topup ants
122- - uses : actions/checkout@v4
123- - name : Install dependencies
124- timeout-minutes : 5
125- run : |
126- pip install .[tests]
127-
128-
149+ # libitk 5.4.1+ segfaults with ants 2.5.4
150+ conda install fsl-fugue fsl-topup ants 'libitk=5.4.0'
129151 - uses : actions/cache@v4
130152 with :
131153 path : ~/.cache/templateflow
@@ -134,7 +156,7 @@ jobs:
134156 tf-cache-
135157 - name : Get TemplateFlow's required objects
136158 run : |
137- python tools/cache_templateflow.py
159+ uv run tools/cache_templateflow.py
138160
139161 - uses : actions/cache@v4
140162 with :
@@ -198,25 +220,23 @@ jobs:
198220 mkdir -p $( dirname $FS_LICENSE )
199221 echo "b2VzdGViYW5Ac3RhbmZvcmQuZWR1CjMwNzU2CiAqQ1MzYkJ5VXMxdTVNCiBGU2kvUGJsejJxR1V3Cg==" | base64 -d > $FS_LICENSE
200222
201- - name : Run pytest with coverage
223+ - name : Install tox
202224 run : |
203- export PATH=${AFNI_HOME}:$PATH
204- export FSLDIR=${CONDA_PREFIX}
205- pytest -v --cov sdcflows --cov-report xml:cov.xml --doctest-modules -n auto sdcflows \
206- --durations=20 --durations-min=10 -m "$MARKS"
207- env :
208- MARKS : ${{ matrix.marks }}
225+ uv tool install tox --with=tox-uv --with=tox-gh-actions
226+ - name : Show tox config
227+ run : tox c
228+ - name : Run tox
229+ run : tox -v --exit-and-dump-after 1200
209230
210- - uses : codecov/codecov-action@v4
231+ - uses : codecov/codecov-action@v5
211232 with :
212- file : cov.xml
213233 token : ${{ secrets.CODECOV_TOKEN }}
214234 if : ${{ always() }}
215235
216236 publish :
217237 name : Publish released package to pypi.org
218238 environment : release-pypi
219- if : github.event.action == 'published'
239+ if : github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
220240 runs-on : ubuntu-latest
221241 needs : [build-package, test]
222242 permissions :
0 commit comments