language: python
python: 2.7
sudo: false
# TODO(issue 532): Fix syntax when 3.5 is natively available upstream
matrix:
  include:
    - python: 3.5
      env:
      - TOX_ENV=py35
env:
  matrix:
  - TOX_ENV=py26
  - TOX_ENV=py27
  - TOX_ENV=py33
  - TOX_ENV=py34
  - TOX_ENV=pypy
  - TOX_ENV=docs
  - TOX_ENV=system-tests
  - TOX_ENV=system-tests3
  - TOX_ENV=gae
  - TOX_ENV=flake8
  global:
  - GAE_PYTHONPATH=${HOME}/.cache/google_appengine
cache:
  directories:
  - ${HOME}/.cache
install:
- ./scripts/install.sh
script:
- ./scripts/run.sh
after_success:
- if [[ "${TOX_ENV}" == "gae" ]]; then tox -e coveralls; fi
notifications:
  email: false

deploy:
  provider: pypi
  user: gcloudpypi
  password:
    secure: "C9ImNa5kbdnrQNfX9ww4PUtQIr3tN+nfxl7eDkP1B8Qr0QNYjrjov7x+DLImkKvmoJd3dxYtYIpLE9esObUHu0gKHYxqymNHtuAAyoBOUfPtmp0vIEse9brNKMtaey5Ngk7ZWz9EHKBBqRHxqgN+Giby+K9Ta3K3urJIq6urYhE="
  on:
    tags: true
    repo: google/oauth2client
