Use pip cache in travis.

This commit is contained in:
Friedrich Lindenberg 2015-05-23 14:35:46 +02:00
parent 07232fa1bd
commit 0893ba5fb2

View File

@ -9,6 +9,7 @@ env:
- DATABASE_URL=postgresql+psycopg2://postgres@127.0.0.1/dataset - DATABASE_URL=postgresql+psycopg2://postgres@127.0.0.1/dataset
- DATABASE_URL=mysql+mysqlconnector://travis@127.0.0.1/dataset?charset=utf8 - DATABASE_URL=mysql+mysqlconnector://travis@127.0.0.1/dataset?charset=utf8
install: install:
- pip install -U pip wheel
- pip install --allow-external mysql-connector-python mysql-connector-python flake8 psycopg2 - pip install --allow-external mysql-connector-python mysql-connector-python flake8 psycopg2
before_script: before_script:
- sh -c "if [ '$DATABASE_URL' = 'postgresql+psycopg2://postgres@127.0.0.1/dataset' ]; then psql -c 'DROP DATABASE IF EXISTS dataset;' -U postgres; fi" - sh -c "if [ '$DATABASE_URL' = 'postgresql+psycopg2://postgres@127.0.0.1/dataset' ]; then psql -c 'DROP DATABASE IF EXISTS dataset;' -U postgres; fi"
@ -17,3 +18,6 @@ before_script:
script: script:
- flake8 --ignore=E501,E123,E124,E126,E127,E128 dataset test - flake8 --ignore=E501,E123,E124,E126,E127,E128 dataset test
- python setup.py test - python setup.py test
cache:
directories:
- $HOME/.cache/pip