pgRouting / pgrouting

Repository contains pgRouting library. Development branch is "develop", stable branch is "master"
https://pgrouting.org
GNU General Public License v2.0
1.16k stars 366 forks source link

Centos 7 self hosted runner - fix permission issue on tests #2453

Closed robe2 closed 1 year ago

robe2 commented 1 year ago

Fixes #2452

Changes proposed in this pull request: We do sudo switch to postgres account, but unfortunately postgres doesn't have rights to the working directory of the runner.

The proposed fix here is to create a postgres database user account for the logged in runner, and then do the tests under then runner account instead of postgres.

Things additional I had to do:

1) Create database with same name as runner, cause by default psql will try to connect to the same named database unless a database is explicitly specified. This was easier than changing all non-test db commands to use postgres database

2) I chose a very bad name for the runner account gha-pgrouting-runner, so had to escape user name in psql commands when creating user and db.

Tests run now but some are failing. I think they are just failing because they really fail on centos

@pgRouting/admins