2015-04-26 15:55:20 +02:00
|
|
|
language: python
|
2015-08-24 18:31:34 +02:00
|
|
|
env:
|
|
|
|
global:
|
|
|
|
- GH_REF: github.com/cimatosa/jobmanager.git
|
|
|
|
- secure: Q3YVqRTs3QLspdzHgYMMuOoMypn7yetkb7v0LFe/68AwxZAwEkpCF24FHL/cEH9khc99AGbDIST81undY6kJLWLEDHYIWaoKUbC8OmaT7H6MUdfLtznsv1NnOLut9Z3So/mTMGQHCmTga9NKsuFpDMxg/oxp3wS915ar6+PLh3w=
|
2015-05-12 11:01:47 +02:00
|
|
|
notifications:
|
|
|
|
email: false
|
2015-04-26 15:49:36 +02:00
|
|
|
python:
|
2015-08-24 18:31:34 +02:00
|
|
|
- '2.7'
|
2015-11-10 00:21:14 +01:00
|
|
|
- '3.4'
|
|
|
|
- '3.5'
|
2015-05-29 10:21:13 +02:00
|
|
|
matrix:
|
|
|
|
allow_failures:
|
2015-08-24 18:31:34 +02:00
|
|
|
- python: '2.7'
|
2015-11-10 00:21:14 +01:00
|
|
|
- python: '3.5'
|
2015-04-26 15:55:20 +02:00
|
|
|
before_install:
|
2015-08-25 09:54:27 +02:00
|
|
|
# required for testing
|
2015-08-25 09:39:54 +02:00
|
|
|
- sudo apt-get update -qq -y
|
2015-08-25 09:34:41 +02:00
|
|
|
- sudo apt-get install openssl
|
2015-05-12 11:32:25 +02:00
|
|
|
- wget https://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh
|
|
|
|
- chmod +x miniconda.sh
|
2015-11-09 23:11:59 +01:00
|
|
|
- INSTALL_DIR=${HOME}
|
|
|
|
- ./miniconda.sh -b -p ${INSTALL_DIR}/miniconda
|
2015-05-12 11:32:25 +02:00
|
|
|
- export PATH=/home/travis/miniconda/bin:$PATH
|
|
|
|
- conda update --yes conda
|
2015-08-24 19:21:35 +02:00
|
|
|
## The following lines are necessary for a test that needs Python 2 and 3
|
|
|
|
# Install python2 and python3 anaconda (required for testing)
|
|
|
|
# python2
|
2015-11-09 23:20:03 +01:00
|
|
|
- conda create -y -n my_py2 python=2 pip numpy scipy matplotlib
|
|
|
|
- source activate my_py2
|
2015-08-24 19:21:35 +02:00
|
|
|
- pip install sqlitedict psutil
|
|
|
|
- source deactivate
|
2015-11-09 23:26:28 +01:00
|
|
|
# python3 (install python3 version as defined in TRAVIS_PYTHON_VERSION)
|
|
|
|
- if [[ $TRAVIS_PYTHON_VERSION == 2.7 ]]; then PYTHON3="3.4"; fi
|
|
|
|
- if [[ $TRAVIS_PYTHON_VERSION != 2.7 ]]; then PYTHON3=$TRAVIS_PYTHON_VERSION; fi
|
|
|
|
- conda create -y -n my_py3 python=$PYTHON3 pip numpy scipy matplotlib
|
2015-11-09 23:20:03 +01:00
|
|
|
- source activate my_py3
|
2015-08-24 19:21:35 +02:00
|
|
|
- pip install sqlitedict psutil
|
|
|
|
- source deactivate
|
|
|
|
# add the two environments to the path
|
2015-11-09 23:20:03 +01:00
|
|
|
- export PATH=/home/travis/miniconda/envs/my_py3/bin:$PATH
|
|
|
|
- export PATH=/home/travis/miniconda/envs/my_py2/bin:$PATH
|
2015-08-24 19:21:35 +02:00
|
|
|
# activate the correct environment
|
2015-11-09 23:20:03 +01:00
|
|
|
- if [[ $TRAVIS_PYTHON_VERSION == 2.7 ]]; then source activate my_py2; fi
|
2015-11-09 23:27:20 +01:00
|
|
|
- if [[ $TRAVIS_PYTHON_VERSION != 2.7 ]]; then source activate my_py3; fi
|
2015-08-24 19:21:35 +02:00
|
|
|
- which python
|
2015-11-09 23:20:03 +01:00
|
|
|
- which python2
|
|
|
|
- which python3
|
2015-05-12 10:48:22 +02:00
|
|
|
install:
|
2015-04-26 16:05:40 +02:00
|
|
|
- pip freeze
|
2015-04-26 15:49:36 +02:00
|
|
|
script:
|
2015-09-07 16:15:00 +02:00
|
|
|
- travis_wait 60 python setup.py test
|
2015-08-24 18:31:34 +02:00
|
|
|
after_success:
|
|
|
|
- git config credential.helper "store --file=.git/credentials"
|
|
|
|
- echo "https://${GH_TOKEN}:@github.com" > .git/credentials
|
2015-08-25 10:14:41 +02:00
|
|
|
- if [[ $TRAVIS_PYTHON_VERSION == 3.4 ]]; then travis_retry conda install --yes sphinx; fi
|
|
|
|
- if [[ $TRAVIS_PYTHON_VERSION == 3.4 ]]; then pip install numpydoc; fi
|
|
|
|
- if [[ $TRAVIS_PYTHON_VERSION == 3.4 ]]; then python doc/deploy_ghpages.py; fi
|