language: python
sudo: false
python:
  - "2.7"
  - "3.6"
  - "3.7"
  - "3.8"
  - "3.9"
  - "3.10"
matrix:
  allow_failures:
    python: "nightly"

cache: pip
before_install:
  - rm -rf dist && python setup.py sdist # prep package distribution
install:
  - pip install dist/*.tar.gz # install dependencies as specified in setup.py
  - pip install -r test_requirements_py`echo $TRAVIS_PYTHON_VERSION | cut -f 1 -d .`.txt
script:
  - black --check .
  - pytest
after_success:
  - coveralls
