language: python
cache: pip

python:
  - 3.4
  - 3.5
  - 3.6
  - 3.7-dev
  - pypy3.3-5.2-alpha1

env:
  - TOXENV=py

addons:
  apt:
    packages:
      - language-pack-de

stages:
  - test
  - name: deploy
    if: tag IS present

install:
  - pip install tox codecov

script:
  - tox

after_script:
  - codecov

jobs:
  include:
    - env: TOXENV=flake8
      python: 3.6
    - env: TOXENV=docs
    - env: TOXENV=repl
    - env: TOXENV=pyicu

    - os: osx
      language: generic
      env: TOXENV=py
      before_install:
        - brew update
        - brew install python3
        - virtualenv env -p python3
        - source env/bin/activate

    - stage: deploy
      script:
        - pip install wheel twine
        - python setup.py sdist bdist_wheel
        - twine upload -u $PYPI_USERNAME -p $PYPI_PASSWORD dist/*
    - stage: deploy
      script:
        - pip install wheel
        - python setup.py sdist bdist_wheel
        - gem install dpl
        - dpl --api-key=$RELEASES_TOKEN --provider=releases --file=dist/* --file_glob=true

language: python
cache: pip

python:
  - 3.6
  - 3.4
  - 3.5
  - 3.7-dev
  - pypy3.3-5.2-alpha1

env:
  - TOXENV=py

addons:
  apt:
    packages:
      - language-pack-de

stages:
  - test
  - name: deploy
    if: tag IS present

install:
  - pip install tox codecov

script:
  - tox

after_script:
  - codecov

jobs:
  include:
    - env: TOXENV=flake8
      python: 3.6
    - env: TOXENV=docs
    - env: TOXENV=repl
    - env: TOXENV=pyicu

    - os: osx
      language: generic
      env: TOXENV=py
      before_install:
        - brew update
        - brew install python3
        - virtualenv env -p python3
        - source env/bin/activate

    - stage: deploy
      script:
        - pip install wheel twine
        - python setup.py sdist bdist_wheel
        - twine upload -u $PYPI_USERNAME -p $PYPI_PASSWORD dist/*
    - stage: deploy
      script:
        - pip install wheel
        - python setup.py sdist bdist_wheel
        - gem install dpl
        - dpl --api-key=$RELEASES_TOKEN --provider=releases --file=dist/* --file_glob=true

Use python3.6 for extra tests
Use python3.6 for extra tests

"extra tests" meaning flake8, docs, and anything else that's not plain
unit-tests.
