forked from coderholic/django-cities
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
76 lines (66 loc) · 2.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
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
# We need to use Ubuntu 16.04 (Xenial Xerus) to get Python 3.7
dist: xenial
language: python
services:
- postgresql
addons:
postgresql: "9.6"
# https://gis.stackexchange.com/a/252610
# apt:
# packages:
# - postgresql-9.6-postgis-2.3
python:
- "2.7"
- "3.4"
- "3.5"
- "3.6"
- "3.7"
env:
- DJANGO_VERSION='Django>=1.8,<1.9'
- DJANGO_VERSION='Django>=1.9,<1.10'
- DJANGO_VERSION='Django>=1.10,<1.11'
- DJANGO_VERSION='Django>=1.11,<2.0'
- DJANGO_VERSION='Django>=2.0,<2.1'
- DJANGO_VERSION='Django>=2.1,<2.2'
- DJANGO_VERSION='https://github.com/django/django/archive/master.tar.gz'
matrix:
exclude:
- python: "2.7"
env: DJANGO_VERSION='Django>=2.0,<2.1'
- python: "2.7"
env: DJANGO_VERSION='Django>=2.1,<2.2'
- python: "3.4"
env: DJANGO_VERSION='Django>=2.1,<2.2'
- python: "2.7"
env: DJANGO_VERSION='https://github.com/django/django/archive/master.tar.gz'
- python: "3.4"
env: DJANGO_VERSION='https://github.com/django/django/archive/master.tar.gz'
allow_failures:
- python: "3.6"
env: DJANGO_VERSION='Django>=1.8,<1.9'
- python: "3.7"
env: DJANGO_VERSION='Django>=1.8,<1.9'
- python: "3.6"
env: DJANGO_VERSION='Django>=1.9,<1.10'
- python: "3.7"
env: DJANGO_VERSION='Django>=1.9,<1.10'
- python: "3.6"
env: DJANGO_VERSION='Django>=1.10,<1.11'
- python: "3.7"
env: DJANGO_VERSION='Django>=1.10,<1.11'
- env: DJANGO_VERSION='https://github.com/django/django/archive/master.tar.gz'
before_install:
# https://gis.stackexchange.com/a/252610
- wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
- sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ xenial-pgdg main" >> /etc/apt/sources.list.d/postgresql.list'
- sudo apt-get install --yes postgresql-9.6-postgis-2.4
install:
- pip install -q $DJANGO_VERSION
- pip install -q django-model-utils flake8 psycopg2 six swapper tox tqdm
before_script:
# - psql -U postgres -c "CREATE EXTENSION postgis;"
- psql -c 'create database django_cities;' -U postgres
- psql -U postgres -c 'CREATE EXTENSION postgis;' -d django_cities
script:
- flake8
- PYTHONPATH=. python test_project/manage.py test test_app --noinput