forked from localwiki/localwiki-backend-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
29 lines (29 loc) · 1.5 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
language: python
python:
- "2.7"
virtualenv:
system_site_packages: true
services:
- redis-server
before_install:
- sudo apt-add-repository -y --remove ppa:ubuntugis/ubuntugis-stable
- sudo rm /etc/apt/sources.list.d/pgdg-source.list
- sudo apt-get update
- sudo apt-get install python-pip
- sudo pip install fabric
- ssh-keygen -t rsa -N "" -f ~/.ssh/id_rsa
- cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
- sudo pip install -r fabric/requirements.txt
- sudo pip install coveralls
- sudo /etc/init.d/postgresql stop
- sudo apt-get -y --purge remove postgresql postgresql-9.1 libpq-dev libpq5 postgresql-client-common postgresql-common postgis postgresql-9.1-postgis
- sudo rm -rf /etc/postgresql
- sudo rm -rf /var/lib/postgresql
- sudo apt-get autoremove
- sudo apt-get -y install -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confnew" postgresql postgresql-9.1
- sudo /etc/init.d/postgresql start
install:
- cd fabric; fab test_server provision -H localhost -i ~/.ssh/id_rsa; cd ~/
script: sudo -u postgres psql -d postgres -c "ALTER ROLE localwiki SUPERUSER;"; sudo chown -R travis /srv/localwiki/env /srv/localwiki/src; source /srv/localwiki/env/bin/activate; pip install coveralls --upgrade --force-reinstall; coverage run --source=localwiki /srv/localwiki/src/localwiki/manage.py test regions pages maps tags versioning diff ckeditor redirects users links api utils
after_success:
- source /srv/localwiki/env/bin/activate; coveralls