fix(ci): make sudo invocation conditional in postgresql-client installation
This commit is contained in:
@@ -49,7 +49,8 @@ jobs:
|
||||
|
||||
- name: Setup test database
|
||||
run: |
|
||||
sudo apt-get update -qq && sudo apt-get install -y -qq postgresql-client
|
||||
if command -v sudo >/dev/null 2>&1; then SUDO="sudo"; else SUDO=""; fi
|
||||
$SUDO apt-get update -qq && $SUDO apt-get install -y -qq postgresql-client
|
||||
for i in $(seq 1 30); do
|
||||
PGPASSWORD=memento_test pg_isready -h postgres -U memento_test -d memento_test && break
|
||||
[ "$i" -eq 30 ] && exit 1
|
||||
|
||||
Reference in New Issue
Block a user