forked from wger-project/wger
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.travis.yml
45 lines (35 loc) · 1.24 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
language: python
# Use container infrastructure
# http://blog.travis-ci.com/2014-12-17-faster-builds-with-container-based-infrastructure/
sudo: false
# Python versions to test
python:
- "2.7"
- "3.3"
- "3.4"
# Manually define here the combinations environment variables to test
# https://github.com/travis-ci/travis-ci/issues/1519
env:
- DJANGO_VERSION=1.7.10 TEST_MOBILE=True DB=postgresql
- DJANGO_VERSION=1.7.10 TEST_MOBILE=True DB=sqlite
- DJANGO_VERSION=1.7.10 TEST_MOBILE=False DB=postgresql
- DJANGO_VERSION=1.7.10 TEST_MOBILE=False DB=sqlite
# Install the application
install:
- sh -c "if [ '$DB' = 'postgresql' ]; then pip install psycopg2; fi"
- pip install -r requirements_devel.txt
- pip install -q Django==$DJANGO_VERSION
- pip install --upgrade django-tastypie
- python extras/scripts/create_local_settings.py
# Create test databases
before_script:
- sh -c "if [ '$DB' = 'postgresql' ]; then psql -c 'DROP DATABASE IF EXISTS test_wger;' -U postgres; fi"
- sh -c "if [ '$DB' = 'postgresql' ]; then psql -c 'CREATE DATABASE test_wger;' -U postgres; fi"
# Do the tests
script:
# Regular application
- coverage run --source='.' ./manage.py test
# Formatting
- pep8 wger
# Code coverage
- coverage report