sudo: false
language: python
cache: pip
python:
  - "3.4"
  - "3.5"
  - "3.6"
  - "nightly"
  - "pypy3.5-5.8.0"
env:
  - TYPING_VERSION="<3.5.3"
  - TYPING_VERSION=">=3.5.3"
matrix:
  allow_failures:
    - python: "nightly"
  include:
    - { python: "3.7", dist: xenial, sudo: true }
install:
  - pip install pytest "typing$TYPING_VERSION" "pytest-cov>=2.5.1"
  # mypy can't be installed on pypy
  - if [[ "${TRAVIS_PYTHON_VERSION}" != "pypy"* ]] ; then pip install mypy ; fi
script:
  - py.test -vv --cov=injector --cov-branch --cov-report html --cov-report term
  - if [[ "${TRAVIS_PYTHON_VERSION}" != "pypy"* ]] ; then mypy injector ; fi

sudo: false
language: python
cache: pip
python:
  - "3.4"
  - "3.5"
  - "3.6"
  - "nightly"
  - "pypy3.5-5.8.0"
env:
  - TYPING_VERSION="<3.5.3"
  - TYPING_VERSION=">=3.5.3"
matrix:
  allow_failures:
    - python: "nightly"
  include:
    - { python: "3.7", dist: xenial, sudo: true }
install:
  - pip install --upgrade pytest "typing$TYPING_VERSION" "pytest-cov>=2.5.1"
  # mypy can't be installed on pypy
  - if [[ "${TRAVIS_PYTHON_VERSION}" != "pypy"* ]] ; then pip install mypy ; fi
script:
  - py.test -vv --cov=injector --cov-branch --cov-report html --cov-report term
  - if [[ "${TRAVIS_PYTHON_VERSION}" != "pypy"* ]] ; then mypy injector ; fi

Upgrade packages if needed in Travis CI
Upgrade packages if needed in Travis CI

Old pytest seems to be already installed in test environments and it
breaks with the latest pytest-cov, let's allow upgrading it.
