forked from django-guardian/django-guardian
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
66 lines (55 loc) · 2.53 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
language: python
sudo: false
cache: pip
python:
- 2.7
- 3.4
- 3.5
- 3.6
env:
- DJANGO_VERSION=1.8 DATABASE_URL=postgres://postgres@/django_guardian
- DJANGO_VERSION=1.10 DATABASE_URL=postgres://postgres@/django_guardian
- DJANGO_VERSION=1.11 DATABASE_URL=postgres://postgres@/django_guardian
- DJANGO_VERSION=master DATABASE_URL=postgres://postgres@/django_guardian
- DJANGO_VERSION=1.8 DATABASE_URL=mysql://root:@localhost/django_guardian
- DJANGO_VERSION=1.10 DATABASE_URL=mysql://root:@localhost/django_guardian
- DJANGO_VERSION=1.11 DATABASE_URL=mysql://root:@localhost/django_guardian
- DJANGO_VERSION=master DATABASE_URL=mysql://root:@localhost/django_guardian
- DJANGO_VERSION=1.8 DATABASE_URL=sqlite://
- DJANGO_VERSION=1.10 DATABASE_URL=sqlite://
- DJANGO_VERSION=1.11 DATABASE_URL=sqlite://
- DJANGO_VERSION=master DATABASE_URL=sqlite://
before_install:
- pip install -q -U pytest
install:
- travis_retry pip install -q mock==1.0.1 pytest pytest-django pytest-cov django-environ setuptools_scm
# Install django master or version
- bash -c "if [[ "$DJANGO_VERSION" == 'master' ]]; then pip install 'https://github.com/django/django/archive/master.tar.gz'; else pip install Django==$DJANGO_VERSION; fi; "
# Install database drivers
- bash -c "if [[ $DATABASE_URL = postgres* ]]; then pip install psycopg2==2.7.1; fi; "
- bash -c "if [[ $DATABASE_URL = mysql* ]]; then pip install mysqlclient==1.3.10; fi; "
script:
- python ./setup.py --version
- py.test --cov=guardian
- bash -c "if [[ $DJANGO_VERSION = 1.10 || $DJANGO_VERSION = 1.11 || $DJANGO_VERSION = "master" ]]; then pip install .; cd example_project; python manage.py test; fi; "
notifications:
irc: "irc.freenode.net#django-guardian"
matrix:
fast_finish: true
exclude:
- python: 2.7
env: DJANGO_VERSION=master DATABASE_URL=postgres://postgres@/django_guardian
- python: 2.7
env: DJANGO_VERSION=master DATABASE_URL=mysql://root:@localhost/django_guardian
- python: 2.7
env: DJANGO_VERSION=master DATABASE_URL=sqlite://
- python: 3.4
env: DJANGO_VERSION=master DATABASE_URL=postgres://postgres@/django_guardian
- python: 3.4
env: DJANGO_VERSION=master DATABASE_URL=mysql://root:@localhost/django_guardian
- python: 3.4
env: DJANGO_VERSION=master DATABASE_URL=sqlite://
allow_failures:
- env: DJANGO_VERSION=master DATABASE_URL=postgres://postgres@/django_guardian
- env: DJANGO_VERSION=master DATABASE_URL=mysql://root:@localhost/django_guardian
- env: DJANGO_VERSION=master DATABASE_URL=sqlite://