Skip to content

Commit

Permalink
Replace installation method for Postgres
Browse files Browse the repository at this point in the history
  • Loading branch information
d-frey committed Apr 26, 2024
1 parent 86d6cfd commit 0659a01
Showing 1 changed file with 2 additions and 25 deletions.
27 changes: 2 additions & 25 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,34 +21,11 @@ jobs:
runs-on: macos-latest

env:
TAOPQ_TEST_DATABASE: host=localhost dbname=mydatabase user=myuser password=mypassword
TAOPQ_TEST_DATABASE: host=localhost dbname=postgres user=postgres password=postgres

steps:
- uses: actions/checkout@v4

- run: |
brew services start postgresql@14
echo "Check PostgreSQL service is running"
i=10
COMMAND='pg_isready'
while [ $i -gt 0 ]; do
echo "Check PostgreSQL service status"
eval $COMMAND && break
((i--))
if [ $i == 0 ]; then
echo "PostgreSQL service not ready, all attempts exhausted"
exit 1
fi
echo "PostgreSQL service not ready, wait 10 more sec, attempts left: $i"
sleep 10
done
- run: |
psql --command="CREATE USER myuser PASSWORD 'mypassword'" --command="\du" postgres
- run: |
createdb --owner=myuser mydatabase
PGPASSWORD=mypassword psql --username=myuser --host=localhost --list mydatabase
- uses: ikalnytskyi/action-setup-postgres@v5

- run: cmake -E make_directory build

Expand Down

0 comments on commit 0659a01

Please sign in to comment.