language: python

python:
  - "2.7"
  - "3.4"
  - "3.5"

addons:
  apt:
    packages:
      - libproj-dev   # otherwise gdal raises an error

before_install:
  - "wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh"
  - "chmod +x miniconda.sh"
  - "./miniconda.sh -b"
  - "export PATH=/home/travis/miniconda2/bin:$PATH"
  - "conda update --yes conda"
  - "conda info -a"

install:
  - "conda create --yes -n test-env python=$TRAVIS_PYTHON_VERSION pip>=8.1 numpy>=1.10 cython>=0.25 pyproj>=1.9 gdal>=2.1 libgdal>=2.1 coverage>=4.2 shapely>=1.5"
  - "source activate test-env"
  - "pip install -r requirements.txt"
  - "pip install coveralls"
  - "pip install . --no-deps"
  - "rm -rf karta/"   # clean-up to workaround coverage.py scanning karta/ dir
                      # while karta module is installed by pip elsewhere

script:
  coverage run --source=karta tests/runtests.py && coverage report

after_success:
  coveralls

sudo:   # container-based testing
  false

language: python

matrix:
  include:
    - python: "2.7"
      env: CHANNEL=defaults
    - python: "3.4"
      env: CHANNEL=defaults
    - python: "3.5"
      env: CHANNEL=defaults
    - python: "3.6"
      env: CHANNEL=conda-forge

before_install:
  - "wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh"
  - "chmod +x miniconda.sh"
  - "./miniconda.sh -b"
  - "export PATH=/home/travis/miniconda2/bin:$PATH"
  - "conda update --yes conda"
  - "conda info --all"

install:
  - "conda create --yes --name test-env --channel $CHANNEL python=$TRAVIS_PYTHON_VERSION numpy cython gdal pyproj shapely coverage"
  - "source activate test-env"
  - "pip install -r requirements.txt"
  - "pip install coveralls"
  - "pip install . --no-deps"
  - "rm -rf karta/"   # clean-up to workaround coverage.py scanning karta/ dir
                      # while karta module is installed by pip elsewhere

script: coverage run --source=karta tests/runtests.py && coverage report
after_success: coveralls
sudo: false   # container-based testing


Add Python 3.6 testing to Travis
Add Python 3.6 testing to Travis

In order to add Python 3.6 with all of the dependencies from conda, it
is necessary to use the conda-forge channel (shapely doesn't seem to be
in defaults, despite what the Aanconda documentation claims).

Unfortunately, conda-forge doesn't have the packages for Python 3.4, and
conda isn't correctly figuring out to build from defaults for Python
3.4.

The build script now uses the defaults channel for Python 2.7, 3.4, and
3.5, and the conda-forge channel for Python 3.6.
