forked from WeblateOrg/weblate
/
.travis.yml
79 lines (79 loc) · 2.75 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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
language: python
python:
- "2.6"
- "2.7"
env:
- DJANGO_VERSION=1.4.5 DATABASE=mysql
- DJANGO_VERSION=1.4.5 DATABASE=postgresql
- DJANGO_VERSION=1.4.5 DATABASE=sqlite
- DJANGO_VERSION=1.5.1 DATABASE=mysql
- DJANGO_VERSION=1.5.1 DATABASE=postgresql
- DJANGO_VERSION=1.5.1 DATABASE=sqlite
matrix:
exclude:
- python: "2.6"
env: DJANGO_VERSION=1.4.5 DATABASE=mysql
- python: "2.6"
env: DJANGO_VERSION=1.4.5 DATABASE=postgresql
- python: "2.6"
env: DJANGO_VERSION=1.5.1 DATABASE=mysql
- python: "2.6"
env: DJANGO_VERSION=1.5.1 DATABASE=postgresql
before_install:
- sudo apt-get update -qq
- sudo apt-get install git libcairo2-dev libgtk2.0-dev libglib2.0-dev libtool libpango1.0-dev libatk1.0-dev libffi-dev libpq-dev libmysqlclient-dev
# commands to install dependencies
install:
- pip install Django==$DJANGO_VERSION
- pip install -r requirements.txt
- pip install mysql-python psycopg2
- pip install pep8
- pip install coveralls
- if [[ $TRAVIS_PYTHON_VERSION == '2.6' ]]; then pip install -r requirements-2.6.txt ; fi
# Environment setup
- export VIRT_ROOT=/home/travis/virtualenv/python$TRAVIS_PYTHON_VERSION
- export PKG_CONFIG_PATH=$VIRT_ROOT/lib/pkgconfig
# PyCairo
- wget http://www.cairographics.org/releases/py2cairo-1.10.0.tar.bz2
- tar xf py2cairo-1.10.0.tar.bz2
- cd py2cairo-1.10.0
- ./waf configure --prefix=$VIRT_ROOT > /dev/null
- ./waf build > /dev/null
- ./waf install > /dev/null
- cd ..
# PyGobject
- wget http://ftp.gnome.org/pub/GNOME/sources/pygobject/2.28/pygobject-2.28.6.tar.bz2
- tar xf pygobject-2.28.6.tar.bz2
- cd pygobject-2.28.6
- ./configure --prefix=$VIRT_ROOT --disable-introspection > /dev/null
- make > /dev/null
- make install > /dev/null
- cd ..
# PyGtk
- wget http://ftp.gnome.org/pub/GNOME/sources/pygtk/2.24/pygtk-2.24.0.tar.bz2
- tar xf pygtk-2.24.0.tar.bz2
- cd pygtk-2.24.0
- ./configure --prefix=$VIRT_ROOT > /dev/null
- make > /dev/null
- make install > /dev/null
- cd ..
# generate configuration and create databases
before_script:
- cp weblate/settings_example.py weblate/settings.py
- mysql -e 'create database weblate;'
- psql -c 'create database weblate;' -U postgres
# commands to run tests
script:
- ./scripts/generate-locales
- ./manage.py validate --settings weblate.settings_test_$DATABASE
- ./manage.py syncdb --noinput --settings weblate.settings_test_$DATABASE
- ./manage.py migrate --settings weblate.settings_test_$DATABASE
- coverage run --source=. ./manage.py test --settings weblate.settings_test_$DATABASE trans lang accounts
- pep8 --exclude migrations accounts trans lang
after_success:
- coveralls
notifications:
irc:
channels: "irc.freenode.org#weblate"
on_success: change
on_failure: change