sudo: false

language: python

python:
 - "2.7"

addons:
  apt:
    packages:
    - git

install:
  # Clone oq-engine
  - git clone -q --depth=1 https://github.com/gem/oq-engine.git
  # Make sure pip is up-to-date and has support for wheels
  - pip -q install -U pip
  # Install oq-engine dependencies
  - pip -q install -r oq-engine/requirements-py27-linux64.txt
  - pip -q install -e oq-engine/
  - pip -q install -e .

script:
  - nosetests -vx tests

sudo: false

language: python

python:
 - "2.7"
 - "3.5"
 - "3.6"

addons:
  apt:
    packages:
    - git

install:
  # Clone oq-engine
  - git clone -q --depth=1 https://github.com/gem/oq-engine.git
  # Make sure pip is up-to-date and has support for wheels
  - pip -q install -U pip
  # Install oq-engine dependencies
  - if [[ $TRAVIS_PYTHON_VERSION == 2.7 ]]; then pip -q install -r oq-engine/requirements-py27-linux64.txt;
    elif [[ $TRAVIS_PYTHON_VERSION == 3.5 ]]; then pip -q install -r oq-engine/requirements-py35-linux64.txt; 
    elif [[ $TRAVIS_PYTHON_VERSION == 3.6 ]]; then pip -q install -r oq-engine/requirements-py36-linux64.txt; 
    else echo "Python not supported" && exit 1; fi
  - pip -q install -e oq-engine/
  - pip -q install -e .

script:
  - nosetests -vx tests

Add support for python 3 under Travis
Add support for python 3 under Travis