diff --git a/.travis.yml b/.travis.yml index 33ced51..a7e520e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,6 +7,10 @@ env: - DAV_SERVER=radicale_git RADICALE_STORAGE=database install: - - "sh install-deps.sh" + - "./install-deps.sh" script: py.test + +cache: + directories: + - /home/travis/virtualenv/python2.7/local/lib/python2.7/site-packages diff --git a/install-deps.sh b/install-deps.sh old mode 100644 new mode 100755 index e2b17f0..b0e9048 --- a/install-deps.sh +++ b/install-deps.sh @@ -1,19 +1,23 @@ +#!/bin/sh pip install --use-mirrors . pip install --use-mirrors -r requirements.txt [[ -z "$DAV_SERVER" ]] && DAV_SERVER=radicale - -radicale_deps() { - if [[ "$RADICALE_STORAGE" == "database" ]]; then - pip install --use-mirrors sqlalchemy - fi -} +[[ -z "$RADICALE_STORAGE" ]] && RADICALE_STORAGE=filesystem davserver_radicale() { pip install --use-mirrors radicale + radicale_deps } davserver_radicale_git() { pip install git+https://github.com/Kozea/Radicale.git + radicale_deps } +radicale_deps() { radicale_storage_$RADICALE_STORAGE; } + +radicale_storage_database() { pip install --use-mirrors sqlalchemy pysqlite; } +radicale_storage_filesystem() { true; } + + davserver_$DAV_SERVER diff --git a/requirements.txt b/requirements.txt index 7ec5eee..6af71ac 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,3 @@ Werkzeug pytest -pytest-capturelog mock