language: python
python:
  - "3.6"
  - "3.5"
  - "3.4"
  - "3.3"
  - "2.7"
  - "2.6"
services:
  - redis-server
env:
  - TEST_HIREDIS=0
  - TEST_HIREDIS=1
install:
  - pip install -e .
  - "if [[ $TEST_PEP8 == '1' ]]; then pip install pep8; fi"
  - "if [[ $TEST_HIREDIS == '1' ]]; then pip install hiredis; fi"
script: "if [[ $TEST_PEP8 == '1' ]]; then pep8 --repeat --show-source --exclude=.venv,.tox,dist,docs,build,*.egg .; else python setup.py test; fi"
matrix:
  include:
    - python: "2.7"
      env: TEST_PEP8=1
    - python: "3.6"
      env: TEST_PEP8=1

language: python
cache: pip
python:
  - "3.6"
  - "3.5"
  - "3.4"
  - "3.3"
  - "2.7"
  - "2.6"
services:
  - redis-server
env:
  - TEST_HIREDIS=0
  - TEST_HIREDIS=1
install:
  - pip install -e .
  - "if [[ $TEST_PEP8 == '1' ]]; then pip install pep8; fi"
  - "if [[ $TEST_HIREDIS == '1' ]]; then pip install hiredis; fi"
script: "if [[ $TEST_PEP8 == '1' ]]; then pep8 --repeat --show-source --exclude=.venv,.tox,dist,docs,build,*.egg .; else python setup.py test; fi"
matrix:
  include:
    - python: "2.7"
      env: TEST_PEP8=1
    - python: "3.6"
      env: TEST_PEP8=1

Enable pip cache in Travis CI
Enable pip cache in Travis CI

Can speed up builds and reduce load on PyPI servers.

For more information, see:

https://docs.travis-ci.com/user/caching/#pip-cache
