language: python
sudo: false
matrix:
    include:
        - os: linux
          python: pypy
        - os: linux
          python: pypy3
          env: BUILOUT_OPTIONS=sphinx:eggs=
        - os: linux
          python: 2.7
        - os: linux
          python: 3.3
        - os: linux
          python: 3.4
        - os: linux
          python: 3.5
install:
    - pip install -U pip
    - pip install zc.buildout
    - buildout $BUILOUT_OPTIONS
script:
    - if [[ $TRAVIS_PYTHON_VERSION != pypy* ]]; then bin/coverage run bin/coverage-test -v1j99; fi
    - if [[ $TRAVIS_PYTHON_VERSION == 'pypy' || $TRAVIS_PYTHON_VERSION == 'pypy3' ]]; then bin/test -v1j99; fi
    - if [[ $TRAVIS_PYTHON_VERSION != 'pypy3' ]]; then pushd doc; make html; popd; fi
    - if [[ $TRAVIS_PYTHON_VERSION != pypy* ]]; then pip install coveralls; fi # install early enough to get into the cache
after_success:
  - if [[ $TRAVIS_PYTHON_VERSION != pypy* ]]; then bin/coverage combine; fi
  - if [[ $TRAVIS_PYTHON_VERSION != pypy* ]]; then coveralls; fi
notifications:
    email: false
cache:
  directories:
    - $HOME/.cache/pip
    - eggs
before_cache:
    - rm -f $HOME/.cache/pip/log/debug.log
