-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy path.travis.yml
41 lines (37 loc) · 1.77 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
dist: xenial
language: node_js
sudo: required
env:
global:
- PGUSER=postgres
- PGDATABASE=postgres
- PGOPTIONS='-c client_min_messages=NOTICE'
- PGPORT=5432
jobs:
include:
- env: POSTGRESQL_VERSION="10" POSTGIS_VERSION="2.5"
node_js: "10"
- env: POSTGRESQL_VERSION="11" POSTGIS_VERSION="2.5"
node_js: "10"
- env: POSTGRESQL_VERSION="12" POSTGIS_VERSION="2.5"
node_js: "10"
- env: POSTGRESQL_VERSION="12" POSTGIS_VERSION="3"
node_js: "10"
- env: POSTGRESQL_VERSION="11" POSTGIS_VERSION="2.5"
node_js: "12"
- env: POSTGRESQL_VERSION="12" POSTGIS_VERSION="3"
node_js: "12"
before_install:
- sudo service postgresql stop
- sudo apt-get remove postgresql* -y
- sudo apt-get install -y --allow-unauthenticated --no-install-recommends --no-install-suggests postgresql-$POSTGRESQL_VERSION postgresql-client-$POSTGRESQL_VERSION postgresql-server-dev-$POSTGRESQL_VERSION postgresql-common
- sudo apt-get install -y --allow-unauthenticated postgresql-$POSTGRESQL_VERSION-postgis-$POSTGIS_VERSION postgresql-$POSTGRESQL_VERSION-postgis-$POSTGIS_VERSION-scripts postgis
# For pre12, install plpython2. For PG12 install plpython3
- if [[ $POSTGRESQL_VERSION != '12' ]]; then sudo apt-get install -y postgresql-plpython-$POSTGRESQL_VERSION python python-redis; else sudo apt-get install -y postgresql-plpython3-12 python3 python3-redis; fi;
- sudo pg_dropcluster --stop $POSTGRESQL_VERSION main
- sudo rm -rf /etc/postgresql/$POSTGRESQL_VERSION /var/lib/postgresql/$POSTGRESQL_VERSION
- sudo pg_createcluster -u postgres $POSTGRESQL_VERSION main -p $PGPORT -- --auth-local trust
- sudo /etc/init.d/postgresql start $POSTGRESQL_VERSION || sudo journalctl -xe
- sudo systemctl status postgresql
after_failure:
- pg_lsclusters