Skip to content

Commit 7ec468f

Browse files
committed
Refactor PostgreSQL initialization commands in tests workflow to remove unnecessary database creation step and streamline execution
1 parent cae6f82 commit 7ec468f

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

.github/workflows/tests.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,10 @@ jobs:
6666
echo "Waiting for PostgreSQL (init)...";
6767
sleep 5;
6868
done
69-
echo "Creating app database..."
70-
docker exec postgres-test-${{ matrix.age_image }} createdb -U app app
7169
echo "Running initialization ..."
72-
docker exec -u app postgres-test-${{ matrix.age_image }} psql -U app -d app -c "CREATE EXTENSION age;"
73-
docker exec -u app postgres-test-${{ matrix.age_image }} psql -U app -d app -c "GRANT SELECT ON ag_catalog.ag_graph TO app;"
74-
docker exec -u app postgres-test-${{ matrix.age_image }} psql -U app -d app -c "GRANT USAGE ON SCHEMA ag_catalog TO app;"
70+
docker exec postgres-test-${{ matrix.age_image }} psql -U app -d app -c "CREATE EXTENSION age;"
71+
docker exec postgres-test-${{ matrix.age_image }} psql -U app -d app -c "GRANT SELECT ON ag_catalog.ag_graph TO app;"
72+
docker exec postgres-test-${{ matrix.age_image }} psql -U app -d app -c "GRANT USAGE ON SCHEMA ag_catalog TO app;"
7573
echo "Database initialized successfully"
7674
7775
- name: Wait for PostgreSQL to be ready

0 commit comments

Comments
 (0)