language: python

cache: pip

jobs:
  fast_finish: true
  include:
    - stage: lint
      name: syntax
      install: pip install black flake8
      script:
        - black --check .
        - flake8 .
    - name: packaging
      install: pip install .[release]
      script: setl publish --no-upload
    - stage: primary
    - python: "2.7"
    - stage: secondary
      python: "3.8"
    - python: "3.7"
    - python: "3.6"
    - python: "nightly"
  allow_failures:
    - python: "nightly"

python: "3.9-dev"

install: pip install .[test]

script: pytest tests
