sudo: false
language: python
cache: pip
python:
  - "3.5"
  - "3.6"
  - "3.7"
  - "nightly"
  - "pypy3.5"
  - "pypy3"
matrix:
  allow_failures:
    - python: "nightly"
install:
  - pip install --upgrade coveralls pytest "pytest-cov>=2.5.1" dataclasses
  # mypy can't be installed on pypy
  - if [[ "${TRAVIS_PYTHON_VERSION}" != "pypy"* ]] ; then pip install mypy ; fi
  # Black is Python 3.6+-only
  - if [[ "${TRAVIS_PYTHON_VERSION}" != "pypy"* &&  "${TRAVIS_PYTHON_VERSION}" != "3.5"* ]] ; then pip install black ; fi
script:
  - py.test -vv --cov=injector --cov-branch --cov-report html --cov-report term
  - if [[ "${TRAVIS_PYTHON_VERSION}" != "pypy"* ]] ; then mypy injector ; fi
  - if [[ "${TRAVIS_PYTHON_VERSION}" != "pypy"* && "${TRAVIS_PYTHON_VERSION}" != "3.5"* ]] ; then black --check . ; fi
after_success:
  - coveralls

sudo: false
language: python
cache: pip
python:
  - "3.5"
  - "3.6"
  - "3.7"
  - "3.8-dev"
  - "nightly"
  - "pypy3.5"
  - "pypy3"
matrix:
  allow_failures:
    - python: "nightly"
    - python: "3.8-dev"
install:
  - pip install --upgrade coveralls pytest "pytest-cov>=2.5.1" dataclasses
  # mypy can't be installed on pypy
  - if [[ "${TRAVIS_PYTHON_VERSION}" != "pypy"* ]] ; then pip install mypy ; fi
  # Black is Python 3.6+-only
  - if [[ "${TRAVIS_PYTHON_VERSION}" != "pypy"* &&  "${TRAVIS_PYTHON_VERSION}" != "3.5"* ]] ; then pip install black ; fi
script:
  - py.test -vv --cov=injector --cov-branch --cov-report html --cov-report term
  - if [[ "${TRAVIS_PYTHON_VERSION}" != "pypy"* ]] ; then mypy injector ; fi
  - if [[ "${TRAVIS_PYTHON_VERSION}" != "pypy"* && "${TRAVIS_PYTHON_VERSION}" != "3.5"* ]] ; then black --check . ; fi
after_success:
  - coveralls

Test with the development version of Python 3.8 in CI
Test with the development version of Python 3.8 in CI

This is in preparation for the Python 3.8 release.
