# After changing this file, check it on:
#   http://lint.travis-ci.org/
language: python
sudo: false

matrix:
  include:
    - os: linux
      python: 3.6
      env:
        - TOXENV=pylint
    - os: linux
      python: 3.6
      env:
        - TOXENV=flake8
    - os: linux
      python: 2.7
      env:
        - TOXENV=py27
    - os: linux
      python: 3.4
      env:
        - TOXENV=py34
    - os: linux
      python: 3.5
      env:
        - TOXENV=py35
    - os: linux
      python: 3.6
      env:
        - TOXENV=py36
    # - os: linux
    #  python: 3.7
    #  env:
    #    - TOXENV=py37
    - os: osx
      osx_image: xcode7.3
      language: objective-c
      env:
        - TRAVIS_PYTHON_VERSION=3.5
        - TOXENV=py35
    - os: osx
      osx_image: xcode9.2
      language: objective-c
      env:
        - TRAVIS_PYTHON_VERSION=3.6
        - TOXENV=py36

cache: pip

before_install:
  - uname -a
  - df -h
  - ulimit -a
  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then source util/travis_osx_install.sh; fi
  - ccache -s
  - which python; python --version
  - pip install --upgrade pip
  - pip install --upgrade wheel
  # Set numpy version first, other packages link against it
  - pip install six nose coverage codecov tox-travis pytest pytest-cov coveralls codacy-coverage

script:
 - tox

after_success:
  - codecov
  - coveralls
  - python-codacy-coverage -r coverage.xml