language: python
python: 3.7
dist: xenial
sudo: false
cache: pip
matrix:
  include:
  - python: 2.7
    env: TOXENV=py27
  - python: 3.4
    env: TOXENV=py34
  - python: 3.5
    env: TOXENV=py35
  - python: 3.6
    env: TOXENV=py36
  - python: 3.7
    env: TOXENV=py37
  - python: pypy3.5
    env: TOXENV=pypy3
install:
- pip install -U setuptools
- pip install tox coveralls
script: tox
after_success: COVERALLS_PARALLEL=true coveralls
notifications:
  webhooks:
    urls:
    - https://coveralls.io/webhook
    - https://webhooks.gitter.im/e/6008c872bf0ecee344f4
    on_success: change
    on_failure: always
    on_start: never
deploy:
  - provider: pypi
    user: JonathanHuot
    password:
      secure: "OozNM16flVLvqDoNzmoTENchhS1w0/dEJZvXBQK2KWmh8fyGj2UZus1vkl6bA5V3Yu9MZLYFpDcltl/qraY3Up6iXQpwKz4q+ICygAudYM2kJ5l8ZEe+wy2FikWbD6LkXf5uKIJJnPNSC8AI86ZyxM/XZxbYjj/+jXyJ1YFZwwQ="
    distributions: sdist bdist_wheel
    on:
      tags: true
      all_branches: true
      condition: $TOXENV = py36
      repo: oauthlib/oauthlib
  - provider: releases
    api_key:
      secure: LEzTaeQt4+Sp21t7usmwaEYLThKIGWDNNj04JADMLgfquTeyz5nDu9P8JNlT//G9RNN20oR8w7jZo97Y+JAylq6Hh/I+p/MEzZi8+NwIpObk3n3zJO4witZQQSTEw/6B7qf1/NQQxjQzlYTJjsGXxBps7srviWZmbH6Tz+epA3A=
    skip_cleanup: true
    on:
      tags: true
      all_branches: true
      condition: $TOXENV = py36
      repo: oauthlib/oauthlib
