Skip to content
Permalink
Browse files

Merge pull request #674 from pgiraud/travis

Using travis container-based infrastructure + use cache
  • Loading branch information
pgiraud committed Jul 29, 2015
2 parents d0de8ec + faffb87 commit 5d8e3f91145c5f6993c588be86a8130cfd738d12
Showing with 20 additions and 19 deletions.
  1. +17 −17 .travis.yml
  2. +2 −2 README.md
  3. +1 −0 requirements.txt
@@ -2,31 +2,31 @@ language: python
python:
- 2.7

cache:
directories:
- $HOME/.cache/pip
- $HOME/build/hotosm/osm-tasking-manager2/env

sudo: false

before_install:
- deactivate
- sudo add-apt-repository -y -r ppa:ubuntugis/ppa
- sudo apt-get update -qq
- sudo apt-get install postgresql-9.1-postgis

install:
- virtualenv env
- source env/bin/activate
- python setup.py develop
- sudo service postgresql restart
- sudo -u postgres createuser www-data --no-superuser --no-createdb --no-createrole
- sudo -u postgres createdb -O www-data osmtm
- sudo -u postgres psql -d osmtm -c "CREATE EXTENSION postgis;"
- sudo -u postgres createdb -O www-data osmtm_tests
- sudo -u postgres psql -d osmtm_tests -c "CREATE EXTENSION postgis;"
- easy_install flake8
- env/bin/pip install --upgrade pip
- env/bin/pip install -r requirements.txt
- createuser www-data --no-superuser --no-createdb --no-createrole -U postgres
- createdb -O www-data osmtm_tests -U postgres
- psql -d osmtm_tests -c "CREATE EXTENSION postgis;" -U postgres
- env/bin/pip install flake8

script:
- source env/bin/activate
- echo [app:main] >> local.test.ini
- echo sqlalchemy.url = postgresql://www-data:www-data@localhost/osmtm_tests >> local.test.ini
- nosetests
- flake8 osmtm --exclude=osmtm/static
- env/bin/nosetests
- env/bin/flake8 osmtm --exclude=osmtm/static

after_success:
- pip install coveralls
- coveralls
- env/bin/pip install coveralls
- env/bin/coveralls
@@ -27,7 +27,7 @@ To create a virtual Python environment:
cd osm-tasking-manager2
sudo easy_install virtualenv
virtualenv --no-site-packages env
./env/bin/python setup.py develop
./env/bin/pip install -r requirements.txt

*Tip: if you encounter problems installing `psycopg2` especially on Mac, it is recommended to follow advice proposed [here](http://stackoverflow.com/questions/22313407/clang-error-unknown-argument-mno-fused-madd-python-package-installation-fa).*

@@ -127,7 +127,7 @@ To run the tests, use the following command:

1. pull latest updates from the repository: `git pull origin`
1. update the submodules: `git submodule update`
1. update/install python modules: `./env/bin/python setup.py develop`
1. update/install python modules: `./env/bin/pip install -r requirements.txt`
1. create database dump: `pg_dump -Fc -f osmtm2_latest.dmp database_name`
1. run database migrations: `alembic upgrade head`
1. compile messages: `./env/bin/python setup.py compile_catalog`
@@ -0,0 +1 @@
-e .

0 comments on commit 5d8e3f9

Please sign in to comment.
You can’t perform that action at this time.