Skip to content

Commit fb0801a

Browse files
committed
CI: Install pytest-xdist in CI for speed
1 parent 0161e81 commit fb0801a

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

.travis.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,11 @@ before_install:
9595
install:
9696
- travis_retry pip install $EXTRA_PIP_FLAGS -e .[$NIPYPE_EXTRAS]
9797

98+
after_install:
99+
- travis_retry pip install pytest-xdist
100+
98101
script:
99-
- py.test -v --cov nipype --cov-config .coveragerc --cov-report xml:cov.xml -c nipype/pytest.ini --doctest-modules nipype
102+
- py.test -v --cov nipype --cov-config .coveragerc --cov-report xml:cov.xml -c nipype/pytest.ini --doctest-modules nipype -n auto
100103

101104
after_script:
102105
- codecov --file cov.xml --flags unittests -e TRAVIS_JOB_NUMBER

docker/files/run_pytests.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ export COVERAGE_FILE=${WORKDIR}/tests/.coverage.py${PYTHON_VERSION}
2929
py.test -v --junitxml=${WORKDIR}/tests/pytests_py${PYTHON_VERSION}.xml \
3030
--cov nipype --cov-config /src/nipype/.coveragerc \
3131
--cov-report xml:${WORKDIR}/tests/coverage_py${PYTHON_VERSION}.xml \
32+
-n auto \
3233
-c ${TESTPATH}/pytest.ini ${TESTPATH}
3334
exit_code=$?
3435

docker/generate_dockerfiles.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,8 @@ function generate_main_dockerfile() {
108108
--miniconda use_env=neuro \
109109
pip_opts="-e" \
110110
pip_install="/src/nipype[all]" \
111+
--miniconda use_env=neuro \
112+
pip_install="pytest-xdist" \
111113
--workdir /work \
112114
--label org.label-schema.build-date='$BUILD_DATE' \
113115
org.label-schema.name="NIPYPE" \

0 commit comments

Comments
 (0)