diff --git a/.github/workflows/build-test-publish.yml b/.github/workflows/build-test-publish.yml index d3d5a03551..f3e6eff2a9 100644 --- a/.github/workflows/build-test-publish.yml +++ b/.github/workflows/build-test-publish.yml @@ -49,15 +49,22 @@ jobs: AFNI_IMSAVE_WARNINGS: NO AFNI_TTATLAS_DATASET: /opt/afni/atlases AFNI_PLUGINPATH: /opt/afni/plugins + MARKS: ${{ matrix.marks }} + DEPENDS: ${{ matrix.dependencies }} strategy: - max-parallel: 6 matrix: python-version: ["3.9", "3.10", "3.11", "3.12"] - marks: ["not slow"] + dependencies: ["latest", "pre"] + marks: ["fast"] include: - python-version: "3.9" - marks: "slow and not veryslow" + dependencies: "min" + marks: "fast" + - python-version: "3.9" + dependencies: "latest" + marks: "slow" - python-version: "3.12" + dependencies: "latest" marks: "veryslow" steps: @@ -94,6 +101,8 @@ jobs: run: | git config --global user.name 'NiPreps Bot' git config --global user.email 'nipreps@gmail.com' + - name: Install the latest version of uv + uses: astral-sh/setup-uv@v4 - name: Set up Python ${{ matrix.python-version }} uses: conda-incubator/setup-miniconda@v3 with: @@ -114,8 +123,9 @@ jobs: python-${{ matrix.python-version }}-${{ env.CACHE_NUM }} - name: Install DataLad run: | - conda install git-annex=*=alldep* pip - pip install datalad datalad-osf + conda install git-annex=*=alldep* + uv tool install datalad --with=datalad-next --with=datalad-osf + uv tool install datalad-osf --with=datalad-next - name: Install fsl and ANTs run: | conda install fsl-fugue fsl-topup ants @@ -198,18 +208,16 @@ jobs: mkdir -p $( dirname $FS_LICENSE ) echo "b2VzdGViYW5Ac3RhbmZvcmQuZWR1CjMwNzU2CiAqQ1MzYkJ5VXMxdTVNCiBGU2kvUGJsejJxR1V3Cg==" | base64 -d > $FS_LICENSE - - name: Run pytest with coverage + - name: Install tox run: | - export PATH=${AFNI_HOME}:$PATH - export FSLDIR=${CONDA_PREFIX} - pytest -v --cov sdcflows --cov-report xml:cov.xml --doctest-modules -n auto sdcflows \ - --durations=20 --durations-min=10 -m "$MARKS" - env: - MARKS: ${{ matrix.marks }} + uv tool install tox --with=tox-uv --with=tox-gh-actions + - name: Show tox config + run: tox c + - name: Run tox + run: tox -v --exit-and-dump-after 1200 - - uses: codecov/codecov-action@v4 + - uses: codecov/codecov-action@v5 with: - file: cov.xml token: ${{ secrets.CODECOV_TOKEN }} if: ${{ always() }} diff --git a/tox.ini b/tox.ini index a5376611f7..0c54dc5b94 100644 --- a/tox.ini +++ b/tox.ini @@ -3,9 +3,9 @@ requires = tox>=4 tox-uv envlist = - py3{9,10,11,12,13}-latest - py39-min - py3{11,12,13}-pre + py3{9,10,11,12,13}-latest-{fast,slow,veryslow} + py39-min-fast + py3{11,12,13}-pre-{fast,slow,veryslow} style spellcheck skip_missing_interpreters = true @@ -25,6 +25,11 @@ DEPENDS = latest: latest pre: pre +MARKS = + fast: fast + slow: slow + veryslow: veryslow + [testenv] description = Pytest with coverage labels = test @@ -68,7 +73,11 @@ uv_resolution = min: lowest-direct commands = - pytest --durations=20 --durations-min=1.0 --cov-report term-missing {posargs:-n auto} + pytest --durations=20 --durations-min=1.0 --cov-report term-missing \ + fast: -m "not slow" \ + slow: -m "slow and not veryslow" \ + veryslow: -m "veryslow" \ + {posargs:-n auto} [testenv:style] description = Check our style guide