|
| 1 | +# vim ft=yaml |
| 2 | +os: linux |
| 3 | +dist: xenial |
| 4 | + |
| 5 | +addons: |
| 6 | + apt: |
| 7 | + packages: |
| 8 | + - libgomp1 |
| 9 | + |
| 10 | + |
| 11 | +language: python |
| 12 | +cache: pip |
| 13 | + |
| 14 | +python: |
| 15 | + - 3.6 |
| 16 | + - 3.7 |
| 17 | + - 3.8 |
| 18 | + |
| 19 | +env: |
| 20 | + global: |
| 21 | + - CHECK_TYPE="tests" |
| 22 | + - INSTALL_DEPENDS="pip setuptools" |
| 23 | + - DEPENDS="-r min-requirements.txt" |
| 24 | + - MRI_ROBUST_TEMPLATE=sx2n7/providers/osfstorage/5e825301d0e35400ebb481f2 |
| 25 | + - FS_LICENSE=/tmp/freesurfer/license.txt |
| 26 | + - TEST_DATA_HOME=/tmp/data |
| 27 | + |
| 28 | +before_install: |
| 29 | + - python -m pip install --upgrade pip virtualenv |
| 30 | + - virtualenv --python=python /tmp/venv |
| 31 | + - source /tmp/venv/bin/activate |
| 32 | + - python --version |
| 33 | + - python -m pip --version |
| 34 | + - python -m pip install --upgrade $INSTALL_DEPENDS |
| 35 | + - python -m pip --version |
| 36 | + |
| 37 | +install: |
| 38 | + - if [ -n "$DEPENDS" ]; then python -m pip install $DEPENDS; fi |
| 39 | + - python -m pip install . |
| 40 | + - python -c "import sdcflows; print(sdcflows.__version__)" |
| 41 | + - travis_retry python -m pip install "sdcflows[$CHECK_TYPE]" |
| 42 | + |
| 43 | +before_script: |
| 44 | + # External dependencies |
| 45 | + - travis_retry bash <(wget -q -O- http://neuro.debian.net/_files/neurodebian-travis.sh); |
| 46 | + - sudo apt-get update |
| 47 | + - sudo apt-get install -y --no-install-recommends git-annex-standalone fsl afni ants |
| 48 | + - curl https://files.osf.io/v1/resources/$MRI_ROBUST_TEMPLATE?direct > mri_robust_template |
| 49 | + - sudo install mri_robust_template /usr/local/bin |
| 50 | + - mkdir /tmp/freesurfer |
| 51 | + - echo "b2VzdGViYW5Ac3RhbmZvcmQuZWR1CjMwNzU2CiAqQ1MzYkJ5VXMxdTVNCiBGU2kvUGJsejJxR1V3Cg==" | base64 -d > $FS_LICENSE |
| 52 | + - python -m pip install datalad |
| 53 | + # Data dependencies |
| 54 | + - python -c "from templateflow import api as tfapi; |
| 55 | + tfapi.get('MNI152NLin2009cAsym', resolution=2, desc='brain', suffix='mask'); |
| 56 | + tfapi.get('MNI152NLin2009cAsym', resolution=1, label='brain', suffix='probseg'); |
| 57 | + tfapi.get('MNI152NLin2009cAsym', resolution=2, desc='fMRIPrep', suffix='boldref');" |
| 58 | + - mkdir -p $TEST_DATA_HOME |
| 59 | + - datalad install -rg -J 1 -s ///openneuro/ds001600 $TEST_DATA_HOME/ds001600 |
| 60 | + - curl https://files.osf.io/v1/resources/9sy2a/providers/osfstorage/5d44b940bcd6d900198ed6be/?zip= --output testdata.zip |
| 61 | + - unzip testdata.zip -d $TEST_DATA_HOME/testdata |
| 62 | + |
| 63 | +script: |
| 64 | + - pytest -v --cov sdcflows --cov-report xml:cov.xml --doctest-modules sdcflows |
| 65 | + |
| 66 | +after_script: |
| 67 | + - python -m pip install codecov |
| 68 | + - python -m codecov --flags travis --file cov.xml -e $TRAVIS_JOB_NUMBER |
0 commit comments