language: python
cache: pip
sudo: false

# Supported CPython versions:
# https://en.wikipedia.org/wiki/CPython#Version_history
python:
 - pypy3
 - 3.7-dev
 - 3.6
 - 3.5
 - 3.4

install:
 - pip install -U coverage
 - pip install -U flake8
 - pip install -U pillow
 - if [[ $TRAVIS_PYTHON_VERSION == 3.6 ]]; then pip install -U black; fi
 # Test at least one version with tqdm
 - if [[ $TRAVIS_PYTHON_VERSION == 3.6 ]]; then pip install -U tqdm; fi

script:
 - pip install -e .
 - coverage erase
 - travis_retry coverage run --append --include="src/*" test/unit/test_manager.py
 - travis_retry coverage run --append --include="src/*" test/functional/test_manager.py

 # Static analysis
 - flake8 setup.py src test examples
 - if [[ $TRAVIS_PYTHON_VERSION == 3.6 ]]; then black --check --diff setup.py src test examples; fi

after_success:
 - coverage report
 - pip install -U codecov
 - codecov

matrix:
  fast_finish: true

language: python
cache: pip
sudo: false

# Supported CPython versions:
# https://en.wikipedia.org/wiki/CPython#Version_history
matrix:
  fast_finish: true
  include:
    - python: "pypy3"
    - python: '3.7'
      dist: xenial
      sudo: required
    - python: '3.6'
    - python: '3.5'
    - python: '3.4'

install:
 - pip install -U coverage
 - pip install -U flake8
 - pip install -U pillow
 - if [[ $TRAVIS_PYTHON_VERSION == 3.6 ]]; then pip install -U black; fi
 # Test at least one version with tqdm
 - if [[ $TRAVIS_PYTHON_VERSION == 3.6 ]]; then pip install -U tqdm; fi

script:
 - pip install -e .
 - coverage erase
 - travis_retry coverage run --append --include="src/*" test/unit/test_manager.py
 - travis_retry coverage run --append --include="src/*" test/functional/test_manager.py

 # Static analysis
 - flake8 setup.py src test examples
 - if [[ $TRAVIS_PYTHON_VERSION == 3.6 ]]; then black --check --diff setup.py src test examples; fi

after_success:
 - coverage report
 - pip install -U codecov
 - codecov

Replace Python 3.7-dev with 3.7 final
Replace Python 3.7-dev with 3.7 final
