Commit 2e832fb7 authored by Paul McCarthy's avatar Paul McCarthy 🚵
Browse files

Only run long tests on release branches

parent 1ab49ce6
Pipeline #1700 failed with stages
in 9 minutes and 32 seconds
......@@ -31,6 +31,7 @@ mkdir -p $FSLDIR/data/
rsync -rv "fsldownload:data/atlases/" "$FSLDIR/data/atlases/"
# Finally, run the damned tests.
TEST_OPTS="--cov-report= --cov-append"
# We run some tests under xvfb-run
# because they invoke wx. Sleep in
......@@ -48,6 +49,12 @@ xvfb-run python setup.py test --addopts="$TEST_OPTS tests/test_platform.py"
chmod -R a+w `pwd`
su -s /bin/bash -c 'source /test.venv/bin/activate && python setup.py test --addopts="$TEST_OPTS tests/test_immv_imcp.py"' nobody
# All other tests can be run as normal
python setup.py test --addopts="$TEST_OPTS --ignore=tests/test_idle.py --ignore=tests/test_platform.py --ignore=tests/test_immv_imcp.py"
# All other tests can be run as normal.
python setup.py test --addopts="$TEST_OPTS -m 'not longtest' --ignore=tests/test_idle.py --ignore=tests/test_platform.py --ignore=tests/test_immv_imcp.py"
# Long tests are only run on release branches
if [[ $CI_COMMIT_REF_NAME == v* ]]; then
python setup.py test --addopts="$TEST_OPTS -m 'longtest'"
fi
python -m coverage report
......@@ -90,9 +90,8 @@ stages:
variables:
UPSTREAM_PROJECT: "fsl/fslpy"
UPSTREAM_URL: "git@git.fmrib.ox.ac.uk"
TEST_OPTS: "--cov-report= --cov-append"
UPSTREAM_PROJECT: "fsl/fslpy"
UPSTREAM_URL: "git@git.fmrib.ox.ac.uk"
####################################
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment