Skip to content

Commit 4b79240

Browse files
committed
TEST: Mark slow tests and run in their own jobs
1 parent e232f6e commit 4b79240

File tree

7 files changed

+17
-1
lines changed

7 files changed

+17
-1
lines changed

.github/workflows/unittests.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,12 @@ jobs:
3434
max-parallel: 5
3535
matrix:
3636
python-version: ["3.9", "3.10", "3.11", "3.12"]
37+
marks: ["not slow"]
38+
include:
39+
- python-version: "3.9"
40+
marks: "slow"
41+
- python-version: "3.12"
42+
marks: "slow"
3743

3844
steps:
3945
- uses: actions/cache@v4
@@ -176,7 +182,9 @@ jobs:
176182
export PATH=${AFNI_HOME}:$PATH
177183
export FSLDIR=${CONDA_PREFIX}
178184
pytest -v --cov sdcflows --cov-report xml:cov.xml --doctest-modules -n auto sdcflows \
179-
--durations=20 --durations-min=10
185+
--durations=20 --durations-min=10 -m "$MARKS"
186+
env:
187+
MARKS: ${{ matrix.marks }}
180188

181189
- uses: codecov/codecov-action@v4
182190
with:

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,9 @@ doctest_optionflags = "ALLOW_UNICODE NORMALIZE_WHITESPACE ELLIPSIS"
165165
env = "PYTHONHASHSEED=0"
166166
filterwarnings = ["ignore::DeprecationWarning"]
167167
junit_family = "xunit2"
168+
markers = [
169+
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
170+
]
168171

169172

170173
[tool.coverage.run]

sdcflows/workflows/fit/tests/test_pepolar.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
from ..pepolar import init_topup_wf
2828

2929

30+
@pytest.mark.slow
3031
@pytest.mark.parametrize("ds", ("ds001771", "HCP101006"))
3132
def test_topup_wf(tmpdir, bids_layouts, workdir, outdir, ds):
3233
"""Test preparation workflow."""

sdcflows/workflows/fit/tests/test_phdiff.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
from ..fieldmap import init_fmap_wf, Workflow
3030

3131

32+
@pytest.mark.slow
3233
@pytest.mark.parametrize(
3334
"fmap_file",
3435
[

sdcflows/workflows/fit/tests/test_syn.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
from ..syn import init_syn_sdc_wf, init_syn_preprocessing_wf, _adjust_zooms, _set_dtype
2929

3030

31+
@pytest.mark.slow
3132
def test_syn_wf(tmpdir, datadir, workdir, outdir, sloppy_mode):
3233
"""Build and run an SDC-SyN workflow."""
3334
derivs_path = datadir / "ds000054" / "derivatives"

sdcflows/workflows/tests/test_ancillary.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
from ..ancillary import init_brainextraction_wf
2929

3030

31+
@pytest.mark.slow
3132
@pytest.mark.parametrize("folder", ["magnitude/ds000054", "magnitude/ds000217"])
3233
def test_brainmasker(tmpdir, datadir, workdir, outdir, folder):
3334
"""Exercise the brain masking tool."""

sdcflows/workflows/tests/test_base.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
from sdcflows.workflows.base import init_fmap_preproc_wf
2929

3030

31+
@pytest.mark.slow
3132
@pytest.mark.parametrize(
3233
"dataset,subject", [("ds000054", "100185"), ("HCP101006", "101006")]
3334
)

0 commit comments

Comments
 (0)