|
| 1 | +language: java |
| 2 | +env: |
| 3 | + - PYTHON_VERSION="2.7" |
| 4 | +before_install: |
| 5 | + # Get the tag if it wasn't provided. Travis doesn't provide this if it isn't a tagged build. |
| 6 | + - if [ -z $TRAVIS_TAG ]; then TRAVIS_TAG=`git tag --contains` ; fi |
| 7 | + - echo $TRAVIS_TAG |
| 8 | + # Move out of git directory to build root. |
| 9 | + - cd ../.. |
| 10 | + - pwd |
| 11 | +install: |
| 12 | + # Download and configure conda. |
| 13 | + - wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh |
| 14 | + - bash miniconda.sh -b -p $HOME/miniconda |
| 15 | + - export PATH="$HOME/miniconda/bin:$PATH" |
| 16 | + - conda config --set always_yes yes |
| 17 | + - conda config --set show_channel_urls True |
| 18 | + - source activate root |
| 19 | + # Install basic conda dependencies. |
| 20 | + - touch $HOME/miniconda/conda-meta/pinned |
| 21 | + - echo "conda-build ==1.16.0" >> $HOME/miniconda/conda-meta/pinned |
| 22 | + - conda update --all |
| 23 | + - conda install conda-build |
| 24 | + # Setup environment for testing and install all dependencies and our package. |
| 25 | + - cd $TRAVIS_REPO_SLUG |
| 26 | + - conda create --use-local -n testenv python=$PYTHON_VERSION |
| 27 | + - source activate testenv |
| 28 | + - conda install numpy |
| 29 | + - python setup.py install |
| 30 | + # Install sphinx to build documentation. |
| 31 | + - conda install sphinx |
| 32 | + # Install coverage and coveralls to generate and submit test coverage results for coveralls.io. |
| 33 | + - echo "coverage 3.*" >> $HOME/miniconda/envs/testenv/conda-meta/pinned |
| 34 | + - conda install nose |
| 35 | + - conda install coverage |
| 36 | + - pip install coveralls |
| 37 | + # Clean up downloads as there are quite a few and they waste space/memory. |
| 38 | + - conda clean -tipsy |
| 39 | + - rm -rfv $HOME/.cache/pip |
| 40 | +script: |
| 41 | + # Run tests. |
| 42 | + - python nosetests.py |
| 43 | + # Build docs. |
| 44 | + - cd docs |
| 45 | + - make html |
| 46 | + - cd .. |
| 47 | +#after_success: |
| 48 | + # Submit results to coveralls.io. |
| 49 | + #- coveralls |
| 50 | +# Use container format for TravisCI for quicker startup and builds. |
| 51 | +sudo: false |
0 commit comments