Skip to content

TST Automatic retries in travis #1659

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Oct 1, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 31 additions & 29 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,36 +10,38 @@ env:
- INSTALL_DEB_DEPENDECIES=false
- INSTALL_DEB_DEPENDECIES=true DUECREDIT_ENABLE=yes
before_install:
- wget http://repo.continuum.io/miniconda/Miniconda${TRAVIS_PYTHON_VERSION:0:1}-latest-Linux-x86_64.sh
-O /home/travis/.cache/miniconda.sh
- bash /home/travis/.cache/miniconda.sh -b -p /home/travis/miniconda
- export PATH=/home/travis/miniconda/bin:$PATH
- if $INSTALL_DEB_DEPENDECIES; then sudo rm -rf /dev/shm; fi
- if $INSTALL_DEB_DEPENDECIES; then sudo ln -s /run/shm /dev/shm; fi
- bash <(wget -q -O- http://neuro.debian.net/_files/neurodebian-travis.sh)
- sudo apt-get -y update
- sudo apt-get -y install xvfb fusefat
- if $INSTALL_DEB_DEPENDECIES; then travis_retry sudo apt-get install -y -qq
fsl afni elastix fsl-atlases; fi
- if $INSTALL_DEB_DEPENDECIES; then
source /etc/fsl/fsl.sh;
source /etc/afni/afni.sh; fi
- export FSLOUTPUTTYPE=NIFTI_GZ
- function bef_inst {
wget http://repo.continuum.io/miniconda/Miniconda${TRAVIS_PYTHON_VERSION:0:1}-latest-Linux-x86_64.sh
-O /home/travis/.cache/miniconda.sh &&
bash /home/travis/.cache/miniconda.sh -b -p /home/travis/miniconda &&
export PATH=/home/travis/miniconda/bin:$PATH &&
if $INSTALL_DEB_DEPENDECIES; then sudo rm -rf /dev/shm; fi &&
if $INSTALL_DEB_DEPENDECIES; then sudo ln -s /run/shm /dev/shm; fi &&
bash <(wget -q -O- http://neuro.debian.net/_files/neurodebian-travis.sh) &&
sudo apt-get -y update &&
sudo apt-get -y install xvfb fusefat &&
if $INSTALL_DEB_DEPENDECIES; then travis_retry sudo apt-get install -y -qq
fsl afni elastix fsl-atlases; fi &&
if $INSTALL_DEB_DEPENDECIES; then
source /etc/fsl/fsl.sh;
source /etc/afni/afni.sh; fi &&
export FSLOUTPUTTYPE=NIFTI_GZ; }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does failure of one line in this function propagates to the exit code of the whole thing? Since the individual commands are not joined by && wouldn't only the exit code of the last command count in the decision if a retry is needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack, of course.

- travis_retry bef_inst
install:
- conda config --add channels conda-forge
- conda update --yes conda
- conda update --all -y python=$TRAVIS_PYTHON_VERSION
# - if [[ "${INSTALL_DEB_DEPENDECIES}" == "true" && ${TRAVIS_PYTHON_VERSION:0:1} == "2" ]]; then
# conda install -y vtk mayavi; fi
- conda install -y nipype matplotlib nitime
- pip install python-coveralls coverage doctest-ignore-unicode
- if [ ! -z "$DUECREDIT_ENABLE"]; then pip install duecredit; fi
- rm -r /home/travis/miniconda/lib/python${TRAVIS_PYTHON_VERSION}/site-packages/nipype*
- pip install -r requirements.txt
- pip install -e .
- export COVERAGE_PROCESS_START=$(pwd)/.coveragerc
- export COVERAGE_DATA_FILE=$(pwd)/.coverage
- echo "data_file = ${COVERAGE_DATA_FILE}" >> ${COVERAGE_PROCESS_START}
- function inst {
conda config --add channels conda-forge &&
conda update --yes conda &&
conda update --all -y python=$TRAVIS_PYTHON_VERSION &&
conda install -y nipype matplotlib nitime &&
pip install python-coveralls coverage doctest-ignore-unicode &&
if [ ! -z "$DUECREDIT_ENABLE"]; then pip install duecredit; fi &&
rm -r /home/travis/miniconda/lib/python${TRAVIS_PYTHON_VERSION}/site-packages/nipype* &&
pip install -r requirements.txt &&
pip install -e . &&
export COVERAGE_PROCESS_START=$(pwd)/.coveragerc &&
export COVERAGE_DATA_FILE=$(pwd)/.coverage &&
echo "data_file = ${COVERAGE_DATA_FILE}" >> ${COVERAGE_PROCESS_START}; }
- travis_retry inst
script:
- python -W once:FSL:UserWarning:nipype `which nosetests` --with-doctest --with-doctest-ignore-unicode --with-cov --cover-package nipype --logging-level=DEBUG --verbosity=3
after_success:
Expand Down