language: python
dist: xenial
sudo: required

cache:
  directories:
    - $HOME/.cache/pip
    - $HOME/.pip-accel

os:
  - linux

python:
  - "3.5"
  - "3.6"
  - "3.7"
  - "nightly"

matrix:
  allow_failures:
    - python: "nightly"

install:
  - travis_retry pip install pytest
  - python setup.py install
  # black needs Python 3.6+, mypy works with 3.5+ but code uses os.PathLike
  - if [[ $TRAVIS_PYTHON_VERSION != '3.5' ]]; then travis_retry pip install black mypy==0.761; fi

script:
  - python -m pytest
  - 
  - if [[ $TRAVIS_PYTHON_VERSION != '3.5' ]]; then mypy --ignore-missing-imports .; fi
  - if [[ $TRAVIS_PYTHON_VERSION != '3.5' ]]; then black --check --diff rpi_backlight tests; fi

skip_join: false

language: python
dist: xenial
sudo: required

cache: pip

os:
  - linux

python:
  - "3.5"
  - "3.6"
  - "3.7"
  - "3.8"
  - "nightly"

matrix:
  allow_failures:
    - python: "nightly"

install:
  - travis_retry pip install pytest
  - python setup.py install
  # black needs Python 3.6+, mypy works with 3.5+ but code uses os.PathLike
  - if [[ $TRAVIS_PYTHON_VERSION != '3.5' ]]; then travis_retry pip install black mypy==0.761; fi

script:
  - python -m pytest
  - 
  - if [[ $TRAVIS_PYTHON_VERSION != '3.5' ]]; then mypy --ignore-missing-imports .; fi
  - if [[ $TRAVIS_PYTHON_VERSION != '3.5' ]]; then black --check --diff rpi_backlight tests; fi

skip_join: false

Add Python 3.8 to Travis CI config
Add Python 3.8 to Travis CI config
