|
| 1 | +dist: trusty |
| 2 | +group: edge |
| 3 | +os: |
| 4 | + - linux |
| 5 | + # travis does not support python on osx yet (https://github.com/travis-ci/travis-ci/issues/4729) |
| 6 | +language: python |
| 7 | +python: |
| 8 | + #- "3.3" test stops at installing spyder notebook etc |
| 9 | + #- "3.4" test fails for unknown reason (sh not found):w |
| 10 | + - "3.5" |
| 11 | + - "3.6" |
| 12 | +before_install: |
| 13 | + # Base SoS |
| 14 | + - sudo apt-get update |
| 15 | + - sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce |
| 16 | + - wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh |
| 17 | + - bash miniconda.sh -b -p $HOME/miniconda |
| 18 | + - export PATH="$HOME/miniconda/bin:$PATH" |
| 19 | + - hash -r |
| 20 | + - conda config --set always_yes yes --set changeps1 no |
| 21 | + - conda update -q conda |
| 22 | + - conda info -a |
| 23 | + |
| 24 | + # downgrade python if needed |
| 25 | + - conda create -n python_test python=$TRAVIS_PYTHON_VERSION anaconda |
| 26 | + - source activate python_test |
| 27 | + |
| 28 | + - pip install docker rq |
| 29 | + - pip install pyyaml psutil tqdm nose |
| 30 | + - pip install fasteners pygments networkx pydot pydotplus |
| 31 | + - pip install entrypoints jupyter coverage codacy-coverage pytest pytest-cov python-coveralls |
| 32 | + - conda install pandas numpy |
| 33 | + |
| 34 | + # SoS Notebook |
| 35 | + - pip install jedi notebook nbconvert nbformat pyyaml psutil tqdm scipy |
| 36 | + - pip install pygments ipython wand graphviz sos sos-bash |
| 37 | + |
| 38 | + # Python 2 |
| 39 | + - conda create -n ipykernel_py2 python=2 ipykernel |
| 40 | + - source activate ipykernel_py2 |
| 41 | + - python -m ipykernel install --user |
| 42 | + - source deactivate ipykernel_py2 |
| 43 | + - source activate python_test |
| 44 | + |
| 45 | +sudo: required |
| 46 | +install: "python setup.py install" |
| 47 | +before_script: |
| 48 | + - cd test |
| 49 | +script: |
| 50 | + - 'if [ $TRAVIS_PYTHON_VERSION == "3.6" ]; then |
| 51 | + pytest -x -v; |
| 52 | + else |
| 53 | + pytest -x -v --cov sos_python --cov-report=xml; |
| 54 | + fi' |
| 55 | + |
| 56 | +after_success: |
| 57 | + - 'if [ $TRAVIS_PYTHON_VERSION == "3.5" ]; then |
| 58 | + coverage combine; |
| 59 | + coveralls; |
| 60 | + fi' |
| 61 | + |
| 62 | +notifications: |
| 63 | + email: |
| 64 | + recipients: |
| 65 | + - ben.bob@gmail.com |
| 66 | + on_success: never |
| 67 | + on_failure: always |
| 68 | + |
0 commit comments