From 9596bdc813046effde2f38f78a52d48f2fe9923e Mon Sep 17 00:00:00 2001 From: Chris Markiewicz Date: Tue, 24 Sep 2024 21:10:32 -0400 Subject: [PATCH] TEST: Mark slow tests and run in their own jobs --- .github/workflows/unittests.yml | 10 +++++++++- sdcflows/workflows/fit/tests/test_pepolar.py | 1 + sdcflows/workflows/fit/tests/test_phdiff.py | 1 + sdcflows/workflows/fit/tests/test_syn.py | 1 + sdcflows/workflows/tests/test_ancillary.py | 1 + sdcflows/workflows/tests/test_base.py | 1 + 6 files changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/unittests.yml b/.github/workflows/unittests.yml index 89ce32bde5..be3f82f4e4 100644 --- a/.github/workflows/unittests.yml +++ b/.github/workflows/unittests.yml @@ -34,6 +34,12 @@ jobs: max-parallel: 5 matrix: python-version: ["3.9", "3.10", "3.11", "3.12"] + marks: ["not slow"] + include: + - python-version: "3.9" + marks: "slow" + - python-version: "3.12" + marks: "slow" steps: - uses: actions/cache@v4 @@ -176,7 +182,9 @@ jobs: 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 + --durations=20 --durations-min=10 -m "$MARKS" + env: + MARKS: ${{ matrix.marks }} - uses: codecov/codecov-action@v4 with: diff --git a/sdcflows/workflows/fit/tests/test_pepolar.py b/sdcflows/workflows/fit/tests/test_pepolar.py index f7dc970d5b..e95128d153 100644 --- a/sdcflows/workflows/fit/tests/test_pepolar.py +++ b/sdcflows/workflows/fit/tests/test_pepolar.py @@ -27,6 +27,7 @@ from ..pepolar import init_topup_wf +@pytest.mark.slow @pytest.mark.parametrize("ds", ("ds001771", "HCP101006")) def test_topup_wf(tmpdir, bids_layouts, workdir, outdir, ds): """Test preparation workflow.""" diff --git a/sdcflows/workflows/fit/tests/test_phdiff.py b/sdcflows/workflows/fit/tests/test_phdiff.py index ef278fbe8b..94932f6243 100644 --- a/sdcflows/workflows/fit/tests/test_phdiff.py +++ b/sdcflows/workflows/fit/tests/test_phdiff.py @@ -29,6 +29,7 @@ from ..fieldmap import init_fmap_wf, Workflow +@pytest.mark.slow @pytest.mark.parametrize( "fmap_file", [ diff --git a/sdcflows/workflows/fit/tests/test_syn.py b/sdcflows/workflows/fit/tests/test_syn.py index 065a594265..905c1d808b 100644 --- a/sdcflows/workflows/fit/tests/test_syn.py +++ b/sdcflows/workflows/fit/tests/test_syn.py @@ -28,6 +28,7 @@ from ..syn import init_syn_sdc_wf, init_syn_preprocessing_wf, _adjust_zooms, _set_dtype +@pytest.mark.slow def test_syn_wf(tmpdir, datadir, workdir, outdir, sloppy_mode): """Build and run an SDC-SyN workflow.""" derivs_path = datadir / "ds000054" / "derivatives" diff --git a/sdcflows/workflows/tests/test_ancillary.py b/sdcflows/workflows/tests/test_ancillary.py index 50f01c87bc..7e407d86e3 100644 --- a/sdcflows/workflows/tests/test_ancillary.py +++ b/sdcflows/workflows/tests/test_ancillary.py @@ -28,6 +28,7 @@ from ..ancillary import init_brainextraction_wf +@pytest.mark.slow @pytest.mark.parametrize("folder", ["magnitude/ds000054", "magnitude/ds000217"]) def test_brainmasker(tmpdir, datadir, workdir, outdir, folder): """Exercise the brain masking tool.""" diff --git a/sdcflows/workflows/tests/test_base.py b/sdcflows/workflows/tests/test_base.py index 39f37348f2..8b74ac9ddf 100644 --- a/sdcflows/workflows/tests/test_base.py +++ b/sdcflows/workflows/tests/test_base.py @@ -28,6 +28,7 @@ from sdcflows.workflows.base import init_fmap_preproc_wf +@pytest.mark.slow @pytest.mark.parametrize( "dataset,subject", [("ds000054", "100185"), ("HCP101006", "101006")] )