Skip to content

Commit

Permalink
TEST: Mark slow tests and run in their own jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
effigies committed Sep 25, 2024
1 parent e232f6e commit 9596bdc
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .github/workflows/unittests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down
1 change: 1 addition & 0 deletions sdcflows/workflows/fit/tests/test_pepolar.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""
Expand Down
1 change: 1 addition & 0 deletions sdcflows/workflows/fit/tests/test_phdiff.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
from ..fieldmap import init_fmap_wf, Workflow


@pytest.mark.slow
@pytest.mark.parametrize(
"fmap_file",
[
Expand Down
1 change: 1 addition & 0 deletions sdcflows/workflows/fit/tests/test_syn.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions sdcflows/workflows/tests/test_ancillary.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""
Expand Down
1 change: 1 addition & 0 deletions sdcflows/workflows/tests/test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")]
)
Expand Down

0 comments on commit 9596bdc

Please sign in to comment.