language: python
cache:
  pip: true

stages:
    - linting
    - test
    - documentation
    - deploy

install:
    - pip install tox

script:
    - tox -q -e $TASK

jobs:
    include:
        - python: 3.6
          env: TASK=py36

          after_success:
              - pip install coveralls
              - coveralls

        - python: 3.7
          dist: xenial
          env: TASK=py37

        - stage: linting
          python: 3.6
          env: TASK=lint

        - stage: documentation
          python: 3.6
          env: TASK=docs

        - stage: deploy
          name: 'Package & Publish to PyPi'
          python: 3.6
          env: TASK=pkg
          deploy:
              provider: script
              skip_cleanup: true
              script:
                - pip install twine
                - twine upload dist/* -u $PYPI_USER -p $PYPI_PASS
              on:
                  branch: master

notifications:
    webhooks:
        urls:
        - https://webhooks.gitter.im/e/4bfa4fbff35ebee0a9d2

language: python
cache:
  pip: true

stages:
    - linting
    - test
    - deploy

install:
    - pip install tox

script:
    - tox -q -e $TASK

jobs:
    include:
        - python: 3.6
          env: TASK=py36
          after_success:
              - pip install coveralls
              - coveralls

        - python: 3.6
          env: TASK=docs

        - python: 3.7
          dist: xenial
          env: TASK=py37

        - stage: linting
          python: 3.6
          env: TASK=lint

        - stage: deploy
          name: 'Package & Publish to PyPi'
          python: 3.6
          env: TASK=pkg
          deploy:
              provider: script
              skip_cleanup: true
              script:
                - pip install twine
                - twine upload dist/* -u $PYPI_USER -p $PYPI_PASS
              on:
                  branch: master

notifications:
    webhooks:
        urls:
        - https://webhooks.gitter.im/e/4bfa4fbff35ebee0a9d2

Include documentation in the 'testing' stage
Include documentation in the 'testing' stage
