--- /dev/null
+# run the check_postgres testsuite on travis-ci.com
+---
+# versions to run on
+env:
+ - PGVERSION=8.4
+ - PGVERSION=9.0
+ - PGVERSION=9.1
+ - PGVERSION=9.2
+ - PGVERSION=9.3
+ - PGVERSION=9.4
+ - PGVERSION=9.5
+ - PGVERSION=9.6
+
+# we don't set "language: perl" here because that doesn't use the system perl
+
+before_install:
+ # apt.postgresql.org is already configured, we just need to add 9.6
+ - |
+ if [ "$PGVERSION" = "9.6" ]; then
+ # update pgdg-source.list
+ sudo sed -i -e 's/main/main 9.6/' /etc/apt/sources.list.d/pgdg*.list
+ fi
+ - sudo apt-get -qq update
+
+install:
+ - sudo apt-get install libdbd-pg-perl
+ # install PostgreSQL $PGVERSION if not there yet
+ - |
+ if [ ! -x /usr/lib/postgresql/$PGVERSION/bin/postgres ]; then
+ sudo apt-get install postgresql-common
+ sudo /etc/init.d/postgresql stop # travis wants only one version running
+ sudo apt-get install postgresql-contrib-$PGVERSION
+ fi
+ - sudo /etc/init.d/postgresql stop
+ - pg_lsclusters
+ - dpkg -l postgresql\* | cat
+ - printenv | sort
+
+script:
+ - rm -rf test_database_check_postgres*
+ - perl Makefile.PL
+ - PGBINDIR=/usr/lib/postgresql/$PGVERSION/bin make test
+
+after_script:
+ - tail -n 200 test_database_check_postgres*/pg.log