|
| 1 | +# We need to use Ubuntu 16.04 (Xenial Xerus) to get Python 3.7 |
| 2 | +dist: xenial |
| 3 | + |
1 | 4 | language: python
|
2 | 5 |
|
3 | 6 | services:
|
4 | 7 | - postgresql
|
5 | 8 |
|
6 | 9 | addons:
|
7 | 10 | postgresql: "9.6"
|
8 |
| - apt: |
9 |
| - packages: |
10 |
| - - postgresql-9.6-postgis-2.3 |
| 11 | + # https://gis.stackexchange.com/a/252610 |
| 12 | + # apt: |
| 13 | + # packages: |
| 14 | + # - postgresql-9.6-postgis-2.3 |
11 | 15 |
|
12 | 16 | python:
|
13 | 17 | - "2.7"
|
14 |
| - - "3.3" |
15 | 18 | - "3.4"
|
16 | 19 | - "3.5"
|
17 | 20 | - "3.6"
|
| 21 | + - "3.7" |
18 | 22 |
|
19 | 23 | env:
|
20 |
| - - DJANGO_VERSION='Django>=1.7,<1.8' |
21 | 24 | - DJANGO_VERSION='Django>=1.8,<1.9'
|
22 | 25 | - DJANGO_VERSION='Django>=1.9,<1.10'
|
23 | 26 | - DJANGO_VERSION='Django>=1.10,<1.11'
|
24 | 27 | - DJANGO_VERSION='Django>=1.11,<2.0'
|
25 | 28 | - DJANGO_VERSION='Django>=2.0,<2.1'
|
| 29 | + - DJANGO_VERSION='Django>=2.1,<2.2' |
26 | 30 | - DJANGO_VERSION='https://github.com/django/django/archive/master.tar.gz'
|
27 | 31 |
|
28 | 32 | matrix:
|
29 | 33 | exclude:
|
30 |
| - - python: "3.5" |
31 |
| - env: DJANGO_VERSION='Django>=1.7,<1.8' |
32 |
| - - python: "3.6" |
33 |
| - env: DJANGO_VERSION='Django>=1.7,<1.8' |
34 |
| - - python: "3.3" |
35 |
| - env: DJANGO_VERSION='Django>=1.9,<1.10' |
36 |
| - - python: "3.3" |
37 |
| - env: DJANGO_VERSION='Django>=1.10,<1.11' |
38 |
| - - python: "3.3" |
39 |
| - env: DJANGO_VERSION='Django>=1.11,<2.0' |
40 | 34 | - python: "2.7"
|
41 | 35 | env: DJANGO_VERSION='Django>=2.0,<2.1'
|
42 |
| - - python: "3.3" |
43 |
| - env: DJANGO_VERSION='Django>=2.0,<2.1' |
44 | 36 | - python: "2.7"
|
45 |
| - env: DJANGO_VERSION='https://github.com/django/django/archive/master.tar.gz' |
46 |
| - - python: "3.3" |
| 37 | + env: DJANGO_VERSION='Django>=2.1,<2.2' |
| 38 | + - python: "3.4" |
| 39 | + env: DJANGO_VERSION='Django>=2.1,<2.2' |
| 40 | + - python: "2.7" |
47 | 41 | env: DJANGO_VERSION='https://github.com/django/django/archive/master.tar.gz'
|
48 | 42 | - python: "3.4"
|
49 | 43 | env: DJANGO_VERSION='https://github.com/django/django/archive/master.tar.gz'
|
50 | 44 | allow_failures:
|
51 |
| - - env: DJANGO_VERSION='Django>=1.7,<1.8' |
52 | 45 | - python: "3.6"
|
53 | 46 | env: DJANGO_VERSION='Django>=1.8,<1.9'
|
| 47 | + - python: "3.7" |
| 48 | + env: DJANGO_VERSION='Django>=1.8,<1.9' |
| 49 | + - python: "3.6" |
| 50 | + env: DJANGO_VERSION='Django>=1.9,<1.10' |
| 51 | + - python: "3.7" |
| 52 | + env: DJANGO_VERSION='Django>=1.9,<1.10' |
| 53 | + - python: "3.6" |
| 54 | + env: DJANGO_VERSION='Django>=1.10,<1.11' |
| 55 | + - python: "3.7" |
| 56 | + env: DJANGO_VERSION='Django>=1.10,<1.11' |
54 | 57 | - env: DJANGO_VERSION='https://github.com/django/django/archive/master.tar.gz'
|
55 | 58 |
|
| 59 | +before_install: |
| 60 | + # https://gis.stackexchange.com/a/252610 |
| 61 | + - wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - |
| 62 | + - sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ xenial-pgdg main" >> /etc/apt/sources.list.d/postgresql.list' |
| 63 | + - sudo apt-get install --yes postgresql-9.6-postgis-2.4 |
| 64 | + |
56 | 65 | install:
|
57 | 66 | - pip install -q $DJANGO_VERSION
|
58 | 67 | - pip install -q django-model-utils flake8 psycopg2 six swapper tox tqdm
|
59 | 68 |
|
60 | 69 | before_script:
|
61 |
| - - psql -U postgres -c "CREATE EXTENSION postgis;" |
| 70 | + # - psql -U postgres -c "CREATE EXTENSION postgis;" |
62 | 71 | - psql -c 'create database django_cities;' -U postgres
|
63 | 72 | - psql -U postgres -c 'CREATE EXTENSION postgis;' -d django_cities
|
64 | 73 |
|
65 | 74 | script:
|
66 |
| - - flake8 --ignore=E501 |
| 75 | + - flake8 |
67 | 76 | - PYTHONPATH=. python test_project/manage.py test test_app --noinput
|
0 commit comments