-
Notifications
You must be signed in to change notification settings - Fork 4
/
.travis.yml
48 lines (46 loc) · 1.7 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
dist: bionic
language: python
jobs:
include:
- stage: test
env: PYTHON3
python: 3.6
install:
- pip -q install -U flake8
- sudo service postgresql stop
script:
- flake8 ./python/
- stage: test
env: POSTGRES
addons:
postgresql: 11
apt:
packages:
- postgresql-11-postgis-2.5
- postgresql-11
- postgresql-client-11
global:
- PGPORT=5433
before_script:
- export PATH="/usr/lib/postgresql/11/bin:$PATH"
- echo "\set ON_ERROR_STOP on" > ~/.psqlrc
- sudo cp /etc/postgresql/9.3/main/pg_hba.conf /etc/postgresql/11/main/pg_hba.conf || (echo "Failed to copy pg_hba.conf, struggling on..." ; true)
- sudo cat /etc/postgresql/11/main/pg_hba.conf
- sudo cat /etc/postgresql/9.3/main/pg_hba.conf
- sudo pg_ctlcluster 11 main restart
- sudo pg_ctlcluster 11 main status
script:
- id
- cd sql;
- sed -e 's/@DB_USER@/postgres/' db_settings.sh.template > db_settings.sh;
- cat db_settings.sh
- createdb -w -p 5433 -h localhost cf
- psql -w -p 5433 -h localhost -d cf -c "create extension postgis;"
- psql -w -p 5433 -h localhost -d cf -f create-users.sql
- psql -w -p 5433 -h localhost -d cf -f 00-common-schema.sql
- echo "Ommitting - need plpython3u - psql -w -p 5433 -h localhost -d cf -f 01-taxonomy2human.sql"
- psql -w -p 5433 -h localhost -d cf -f 02-hazard-schema.sql
- psql -w -p 5433 -h localhost -d cf -f 03-ged4all-schema.sql
- psql -w -p 5433 -h localhost -d cf -f 04-loss-schema.sql
- psql -w -p 5433 -h localhost -d cf -f 05-mover-schema.sql
- psql -w -p 5433 -h localhost -d cf -f 06-permissions.sql