mirror of
https://gh.wpcy.net/https://github.com/WeblateOrg/weblate.git
synced 2026-05-02 19:55:20 +08:00
50 lines
2.3 KiB
YAML
50 lines
2.3 KiB
YAML
language: python
|
|
python:
|
|
- "2.6"
|
|
- "2.7"
|
|
env:
|
|
matrix:
|
|
- DJANGO_VERSION=1.4.8 TRAVIS_DATABASE=sqlite
|
|
- DJANGO_VERSION=1.5.4 TRAVIS_DATABASE=mysql
|
|
- DJANGO_VERSION=1.5.4 TRAVIS_DATABASE=postgresql
|
|
- DJANGO_VERSION=1.5.4 TRAVIS_DATABASE=sqlite TRAVIS_SELENIUM=1
|
|
global:
|
|
# Sauce labs setup
|
|
- secure: "W4EtqCQSbSWb2sDwHd0obttzUTKIPyFZE90qD+YdV76YLgIK7QX4Vc6Hx9fRRNy397h4RrYIzyU2vemGIR5j8cR16Y6MyJ8Fy4DyC2mHyo3T7Tx4/cJYTQDPF2G4kxjR+vmhsdQIdmaYLsjtb2C2M0aIkU8FGFv6D3+TXqsoOmI="
|
|
- secure: "AYu5aeoSHEbBA67Y60yhVa5B/3a7ZLvECnGvyKGfH4oJU/yeEBokgiqFzwRAcXWILMVSMTVGw3vpcq3B/5SRg1vuq+OzRzZ/kopwd4z7P91MYNeXgKNC0bIgEyKg0Fb3ElK1XjFlAXLlIZTwhVBwuJSX+EUFluecN8kJ7Cf7yjE="
|
|
matrix:
|
|
# Test with Python 2.6 just once for every Django version
|
|
exclude:
|
|
- python: "2.6"
|
|
env: DJANGO_VERSION=1.5.4 TRAVIS_DATABASE=mysql
|
|
- python: "2.6"
|
|
env: DJANGO_VERSION=1.5.4 TRAVIS_DATABASE=postgresql
|
|
- python: "2.6"
|
|
env: DJANGO_VERSION=1.5.4 TRAVIS_DATABASE=sqlite
|
|
before_install:
|
|
- sudo apt-get update -qq
|
|
- sudo apt-get install git libffi-dev libpq-dev libmysqlclient-dev libicu-dev
|
|
# commands to install dependencies
|
|
install:
|
|
- pip install --use-mirrors Django==$DJANGO_VERSION
|
|
- pip install --use-mirrors -r requirements.txt
|
|
- pip install --use-mirrors -r requirements-optional.txt
|
|
- pip install --use-mirrors -r requirements-test.txt
|
|
- if [[ $TRAVIS_PYTHON_VERSION == '2.6' ]]; then pip install --use-mirrors -r requirements-2.6.txt ; fi
|
|
# 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
|
|
- if [[ 0$TRAVIS_SELENIUM -eq 1 ]]; then curl https://gist.github.com/santiycr/5139565/raw/sauce_connect_setup.sh | bash ; fi
|
|
# commands to run tests
|
|
script:
|
|
- ./scripts/generate-locales
|
|
- ./manage.py validate --settings weblate.settings_test_$TRAVIS_DATABASE
|
|
- ./manage.py syncdb --noinput --settings weblate.settings_test_$TRAVIS_DATABASE
|
|
- ./manage.py migrate --settings weblate.settings_test_$TRAVIS_DATABASE
|
|
- coverage run --source=. ./manage.py test --settings weblate.settings_test_$TRAVIS_DATABASE trans lang accounts
|
|
- pep8 --exclude migrations accounts trans lang weblate
|
|
- pylint --reports=n --rcfile=pylint.rc trans accounts weblate lang
|
|
after_success:
|
|
- coveralls
|