language: python
python:
  - "2.7"
env:
  - TOX_ENV=coverageenv
install:
  - "pip install tox --download-cache $HOME/.pip-cache"
  - "pip install coveralls --download-cache $HOME/.pip-cache"
script:
  tox -e $TOX_ENV
after_success:
  coveralls
cache:
  directories:
    - .tox
    - $HOME/.pip-cache/
deploy:
  provider: pypi
  server: https://testpypi.python.org/pypi
  user: chuim
  password:
    secure: XEB8GFOxRWVhMX2O/at9DF3Y3xQA71+ZJL5zF/KCyY5aKA7WnerwmRT/4s6HIpC1MG8H8f2sexFywSsOOHSa8TybHtZNDSQEMN2G7Xcynv3u+WEICGDUfanRL+17Q7YjvU7WzdddcTzSmn9DVrv+YqfN+3p6QzWSXhNQWqcDsIk=
  on:
    branch: production

language: python
python:
  - "2.7"
env:
  - TOX_ENV=coverageenv RUN_COVERALLS=1
#  - TOX_ENV=27gevent
#  - TOX_ENV=pypygevent
#  - TOX_ENV=33gevent
install:
  - "pip install tox --download-cache $HOME/.pip-cache"
  - "pip install coveralls --download-cache $HOME/.pip-cache"
script:
  tox -e $TOX_ENV
after_success:
# Is there a better way to do this, and only run coveralls
# for the coverageenv environment?
  - "if [ \"x$RUN_COVERALLS\" == \"x1\" ]; then eval \"coveralls\"; fi"
cache:
  directories:
    - .tox
    - $HOME/.pip-cache/
deploy:
  provider: pypi
  server: https://testpypi.python.org/pypi
  user: chuim
  password:
    secure: XEB8GFOxRWVhMX2O/at9DF3Y3xQA71+ZJL5zF/KCyY5aKA7WnerwmRT/4s6HIpC1MG8H8f2sexFywSsOOHSa8TybHtZNDSQEMN2G7Xcynv3u+WEICGDUfanRL+17Q7YjvU7WzdddcTzSmn9DVrv+YqfN+3p6QzWSXhNQWqcDsIk=
  on:
    branch: production

Set up coveralls to only run if RUN_COVERALLS=1
Set up coveralls to only run if RUN_COVERALLS=1
