I'm trying to set up CI for some PL/Python PostgreSQL procedures in Travis CI.
I've tried several ways:
1) With the legacy infrastructure I've tried to just assume, that PL/Python is already installed, but it had not succeed:
The command "psql -U postgres -c 'CREATE EXTENSION plpythonu;'" exited with 1.
0.01s$ psql -U postgres -d test -c 'CREATE LANGUAGE plpythonu;'
ERROR: could not access file "$libdir/plpython2": No such file or directory
2) Have tried to add sudo apt-get update && sudo apt-get -y install postgresql-plpython-9.4
commands in the beginning. And it was also failed, because this command initiated replacement of PostgresSQL 9.4, that comes already installed in the Travis environment.
3) Also tried to use container-based infrastructure with this lines in the config:
addons:
postgresql: "9.4"
apt:
packages:
- postgresql-plpython-9.4
No success too.
What is the good way to test PL/Python procedure in Travis CI?