diff --git a/.travis.yml b/.travis.yml index 396d111..a115286 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,23 +17,26 @@ env: - POSTGRESQL_VERSION="12" -before_install: +script: - 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 - if [[ $POSTGRESQL_VERSION == '9.6' ]]; then sudo apt-get install -y postgresql-contrib-9.6; fi; - - sudo apt-get install -y --allow-unauthenticated postgresql-$POSTGRESQL_VERSION-postgis-$POSTGIS_VERSION postgresql-$POSTGRESQL_VERSION-postgis-$POSTGIS_VERSION-scripts postgis postgresql-plpython-$POSTGRESQL_VERSION + - 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 and make it default + - if [[ $POSTGRESQL_VERSION != '12' ]]; then sudo apt-get install -y postgresql-plpython-$POSTGRESQL_VERSION; else sudo apt-get install -y postgresql-plpython3-12 && sudo cp /usr/share/postgresql/12/extension/plpython3u.control /usr/share/postgresql/12/extension/plpythonu.control && sudo cp /usr/share/postgresql/12/extension/plpython3u--1.0.sql /usr/share/postgresql/12/extension/plpythonu--1.0.sql && sudo cp /usr/share/postgresql/12/extension/plpython3u--unpackaged--1.0.sql /usr/share/postgresql/12/extension/plpythonu--unpackaged--1.0.sql; 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 -- --auth-local trust --auth-host password - sudo /etc/init.d/postgresql start $POSTGRESQL_VERSION || sudo journalctl -xe - sudo pip install redis==2.4.9 -script: + - make - sudo make install - make installcheck after_failure: + - dpkg-query -L postgresql-plpython3-$POSTGRESQL_VERSION - pg_lsclusters - cat regression.out - cat regression.diffs