Skip to content

Commit 3cdd5e0

Browse files
committed
FIX: update github tests.yml to be more in line with fmriprep
1 parent 6d15a80 commit 3cdd5e0

File tree

1 file changed

+73
-9
lines changed

1 file changed

+73
-9
lines changed

.github/workflows/tests.yml

Lines changed: 73 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Tests
1+
name: Stable tests
22

33
on:
44
push:
@@ -8,18 +8,82 @@ on:
88
branches:
99
- main
1010

11+
defaults:
12+
run:
13+
shell: bash
14+
15+
env:
16+
FORCE_COLOR: true
17+
18+
concurrency:
19+
group: ${{ github.workflow }}-${{ github.ref }}
20+
cancel-in-progress: true
21+
22+
permissions:
23+
contents: read
24+
1125
jobs:
12-
tests:
13-
runs-on: ubuntu-latest
26+
test:
27+
runs-on: ${{ matrix.os }}
1428
strategy:
1529
matrix:
16-
python-version: ["3.10", "3.11", "3.12"]
30+
os: [ 'ubuntu-latest' ]
31+
python-version: ['3.10', '3.11', '3.12', '3.13']
32+
dependencies: ['latest', 'pre']
33+
include:
34+
- os: ubuntu-latest
35+
python-version: '3.10'
36+
dependencies: 'min'
37+
env:
38+
DEPENDS: ${{ matrix.dependencies }}
1739
steps:
1840
- uses: actions/checkout@v4
19-
- uses: actions/setup-python@v5
41+
with:
42+
submodules: recursive
43+
fetch-depth: 0
44+
- uses: actions/cache@v4
45+
with:
46+
path: ~/.cache/templateflow
47+
key: templateflow-v1
48+
- name: Install dependencies
49+
run: |
50+
sudo apt update
51+
sudo apt install -y --no-install-recommends graphviz
52+
- name: Install the latest version of uv
53+
uses: astral-sh/setup-uv@v6
54+
- name: Set up Python ${{ matrix.python-version }}
55+
uses: actions/setup-python@v5
2056
with:
2157
python-version: ${{ matrix.python-version }}
22-
- run: pip install -e .[tests]
23-
- run: pytest -sv
24-
- name: Upload coverage to Codecov
25-
uses: codecov/codecov-action@v4
58+
- name: Display Python version
59+
run: python -c "import sys; print(sys.version)"
60+
- name: Install tox
61+
run: |
62+
uv tool install --with=tox-uv --with=tox-gh-actions tox
63+
- name: Show tox config
64+
run: tox c
65+
- name: Run tox
66+
run: tox -v --exit-and-dump-after 1200
67+
- uses: codecov/codecov-action@v5
68+
with:
69+
token: ${{ secrets.CODECOV_TOKEN }}
70+
if: ${{ always() }}
71+
72+
checks:
73+
runs-on: ubuntu-latest
74+
continue-on-error: true
75+
strategy:
76+
matrix:
77+
check: ['style', 'spellcheck']
78+
steps:
79+
- uses: actions/checkout@v4
80+
with:
81+
persist-credentials: false
82+
- name: Install the latest version of uv
83+
uses: astral-sh/setup-uv@v6
84+
- name: Install tox
85+
run: uv tool install tox --with=tox-uv
86+
- name: Show tox config
87+
run: tox c -e ${{ matrix.check }}
88+
- name: Run check
89+
run: tox -e ${{ matrix.check }}

0 commit comments

Comments
 (0)