This is failing since the update to Xenial [1] with the following
warning:
$ sudo -u postgres psql -c "grant ALL on DATABASE postgres to travis WITH GRANT OPTION;"
could not change directory to "/home/travis/build/getpatchwork/patchwork": Permission denied
psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5433"?
Use the solution from [2] to resolve it.
[1] https://travis-ci.org/getpatchwork/patchwork/jobs/
582342649
[2] https://github.com/travis-ci/travis-ci/issues/8537#issuecomment-
498299645
Signed-off-by: Stephen Finucane <stephen@that.guru>
- PW_TEST_DB_USER=root
- addons:
postgresql: 10
- apt:
- packages:
- - postgresql-10
- - postgresql-client-10
env:
- - PGPORT=5433
- - PW_TEST_DB_HOST=""
- - PW_TEST_DB_PORT=5433
- PW_TEST_DB_TYPE=postgres
- - PW_TEST_DB_USER=travis
+ - PW_TEST_DB_USER=postgres
python: 3.7
- sudo: true
- before_install:
- - sudo -u postgres psql -c "grant ALL on DATABASE postgres to travis WITH GRANT OPTION;"
before_script:
- if [[ $PW_TEST_DB_TYPE == mysql ]]; then mysql -e "create database patchwork character set utf8;"; fi