Update drone pipeline

enable postgres DB on drone pipeline for further tests
This commit is contained in:
Nick Bland
2021-11-08 12:43:28 +10:00
parent 6db0a7bc86
commit 7d7e7dc2d5
2 changed files with 30 additions and 5 deletions

View File

@@ -13,7 +13,7 @@ fi
if ! [ -x "$(command -v sqlx)" ]; then
echo >&2 "Error: `sqlx` is not installed."
echo >&2 "Use:"
echo >&2 " sudo apt install build-essential pkg-config openssl libssl-dev"
echo >&2 " sudo apt install build-essential pkg-config libssl-dev"
echo >&2 " cargo install --version=0.5.7 sqlx-cli --no-default-features --features postgres"
echo >&2 "to install it."
exit 1
@@ -43,7 +43,7 @@ until psql -h "localhost" -U "${DB_USER}" -p "${DB_PORT}" -d "postgres" -c '\q';
sleep 1
done
>&2 echo "Postgres is up anad running on port ${DB_PORT} - running migrations."
>&2 echo "Postgres is up and running on port ${DB_PORT} - running migrations."
export DATABASE_URL=postgres://${DB_USER}:${DB_PASSWORD}@localhost:${DB_PORT}/${DB_NAME}
sqlx database create