sudo: false

language: python

python:
 - "3.5"

addons:
  apt:
    packages:
    - git

env:
    global:
    - PYTHONPATH=$TRAVIS_BUILD_DIR/oq-engine:$TRAVIS_BUILD_DIR/oq-hazardlib

install:
  - pip install -r requirements-py35-linux64.txt
  - if [ "$(git ls-remote --heads https://github.com/gem/oq-hazardlib.git ${TRAVIS_BRANCH})" != "" ]; then BRANCH=$TRAVIS_BRANCH; else BRANCH='master'; fi; git clone -b ${BRANCH} --depth=1 https://github.com/gem/oq-hazardlib.git && echo "Running on oq-hazardlib/${BRANCH}"

# We must set the PYTHONPATH to the root oq-engine (insted of oq-engine/openquake) because otherwise
# the full 'openquake' namespace is overwritten and then hazardlib and baselib are not found
script:
  - nosetests --with-doctest -vsx -a'!slow'
  - cat /tmp/webui*
  - bin/oq info -r demos/hazard
  # Test dependencies in setup.py
  - pip install oq-hazardlib/ && pip install .
  - cd /tmp && python -c 'import openquake.engine'

sudo: false

language: python

python:
 - "3.5"

addons:
  apt:
    packages:
    - git

env:
    global:
    - PYTHONPATH=$TRAVIS_BUILD_DIR/oq-engine:$TRAVIS_BUILD_DIR/oq-hazardlib

install:
  - pip install -r requirements-py35-linux64.txt
  - if [ "$(git ls-remote --heads https://github.com/gem/oq-hazardlib.git ${TRAVIS_BRANCH})" != "" ]; then BRANCH=$TRAVIS_BRANCH; else BRANCH='master'; fi; git clone -b ${BRANCH} --depth=1 https://github.com/gem/oq-hazardlib.git && echo "Running on oq-hazardlib/${BRANCH}"

# We must set the PYTHONPATH to the root oq-engine (insted of oq-engine/openquake) because otherwise
# the full 'openquake' namespace is overwritten and then hazardlib and baselib are not found
script:
  - nosetests --with-doctest -vsx -a'!slow'
  - cat /tmp/webui*
  - bin/oq info -r demos/hazard
  # Test dependencies in setup.py
  - pip install oq-hazardlib/ && pip install .
  - cd /tmp && unset PYTHONPATH && python -c 'import openquake.engine'

Make sure PYTHONPATH is not set when testing setup.py
Make sure PYTHONPATH is not set when testing setup.py


Former-commit-id: 5edc9205b1be7d8b511e1f9e81cee5acbb3c71a6