sudo: false

language: python

python:
 - "3.5"

addons:
  apt:
    packages:
    - git

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}"
  - pip install -e oq-hazardlib/
  - pip install -e .

script:
  - python -c'import platform; print(platform.platform())'
  - bin/run-demos.sh
  - nosetests --with-doctest -vsx -a'!slow'
  - cat /tmp/webui*
  - bin/oq reset --yes

after_success:
  - pip install sphinx==1.3.6
  - cd doc/sphinx
  - make html

sudo: false

language: python

python:
 - "3.5"

addons:
  apt:
    packages:
    - git

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

script:
  - python -c'import platform; print(platform.platform())'
  - bin/run-demos.sh
  - nosetests --with-doctest -vsx -a'!slow'
  - cat /tmp/webui*
  - bin/oq reset --yes

after_success:
  - pip install sphinx==1.3.6
  - cd doc/sphinx
  - make html

Fix an issue with Travis branches when submitting PR
Fix an issue with Travis branches when submitting PR
