language: python
python:
  - "2.7"
cache: pip
sudo: false
install:
  - "pip install -e . -r requirements.txt"
services:
  - postgresql
  - redis-server
before_script:
  # Necessary variables
  - "export WEB_SECRET_KEY=somerandomstring"
  - "export STORAGE_URL=postgres://postgres@localhost:5432/botbot"
  - "export REDIS_PLUGIN_STORAGE_URL=redis://localhost:6379/0"
  - "export REDIS_PLUGIN_QUEUE_URL=redis://localhost:6379/1"
  - "psql -c 'create database botbot;' -U postgres"
  - "psql -c 'create extension hstore;' -U postgres botbot"
  - "psql -c 'create extension hstore;' -U postgres template1"
  - "echo 'STORAGE_URL=postgres://postgres@localhost:5432/botbot' >> .env"
  - "manage.py collectstatic --noinput"
script: "manage.py test"

language: python
python:
  - "2.7"
cache:
  directories:
    - $HOME/.cache/pip
    - $HOME/virtualenv
sudo: false
install:
  - "pip install -e . -r requirements.txt"
services:
  - postgresql
  - redis-server
before_script:
  # Necessary variables
  - "export WEB_SECRET_KEY=somerandomstring"
  - "export STORAGE_URL=postgres://postgres@localhost:5432/botbot"
  - "export REDIS_PLUGIN_STORAGE_URL=redis://localhost:6379/0"
  - "export REDIS_PLUGIN_QUEUE_URL=redis://localhost:6379/1"
  - "psql -c 'create database botbot;' -U postgres"
  - "psql -c 'create extension hstore;' -U postgres botbot"
  - "psql -c 'create extension hstore;' -U postgres template1"
  - "echo 'STORAGE_URL=postgres://postgres@localhost:5432/botbot' >> .env"
  - "manage.py collectstatic --noinput"
script: "manage.py test"

Add virtualenv caching to further speed up Travis
Add virtualenv caching to further speed up Travis