This repository has been archived by the owner on May 8, 2020. It is now read-only.
forked from paulocheque/django-dynamic-fixture
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
84 lines (75 loc) · 1.99 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
77
78
79
80
81
82
83
84
dist: bionic
sudo: true
language: python
# Avoid Travis run the same build for `push` and `PR`
branches:
only:
- "master"
services:
- postgresql
# https://trac.osgeo.org/postgis/wiki/UsersWikiPostgreSQLPostGIS
addons:
postgresql: "10"
apt:
packages:
- libgdal-dev
- postgresql-10
- postgresql-10-postgis-2.4
matrix:
include:
# https://docs.djangoproject.com/en/1.11/ref/contrib/gis/install/
- python: 2.7
env:
- DJANGO=1.11
- DATABASE=sqlite
- python: 2.7
env:
- DJANGO=1.11
- DATABASE=postgres
# https://docs.djangoproject.com/en/2.2/ref/contrib/gis/install/
- python: 3.6
env:
- DJANGO=2.2
- DATABASE=sqlite
- python: 3.6
env:
- DJANGO=2.2
- DATABASE=postgres
# https://docs.djangoproject.com/en/3.0/ref/contrib/gis/install/
# https://docs.djangoproject.com/en/3.0/releases/3.0/#id2
- python: 3.7
env:
- DJANGO=3.0
- DATABASE=sqlite
- python: 3.8
env:
- DJANGO=3.0
- DATABASE=sqlite
- python: 3.8
env:
- DJANGO=3.0
- DATABASE=postgres
before_script:
- export PYTHONPATH=$PYTHONPATH:$(pwd)
# check gis
- gdal-config --version
- gdal-config --cflags
- psql -U postgres -c "create extension postgis"
# set up postgresql
- psql -U postgres -c "create role cacheops login superuser"
# postgis django backend requires these to exist
- psql -U postgres -c "create database cacheops"
- psql -U postgres -c "create database cacheops_slave"
# create db and user
- psql -c "CREATE DATABASE ddf;" -U postgres
- psql -c "CREATE USER ddf_user WITH PASSWORD 'ddf_pass';" -U postgres
- psql -c "ALTER USER ddf_user CREATEDB;" -U postgres
- psql -c "ALTER USER ddf_user WITH SUPERUSER;" -U postgres
install:
- pip install -r requirements.txt
- pip install psycopg2 pytest pytest-django coveralls
- pip install Django~=${DJANGO}.0
script:
- pytest --create-db --reuse-db --no-migrations --ds=settings_${DATABASE}
after_success:
- coveralls