hopefully working
Some checks failed
GoLang Tests / check and test (push) Has been cancelled

This commit is contained in:
2025-08-21 22:23:22 +02:00
parent 6c544174d0
commit 81cdca42f9

View File

@@ -36,10 +36,18 @@ jobs:
/go_path
/go_cache
key: go_path-${{ steps.hash-go.outputs.hash }}
- uses: harmon758/postgresql-action@v1
with:
postgresql version: "16"
postgresql user: ${{ env.POSTGRES_USER }}
postgresql password: ${{ env.POSTGRES_PASSWORD }}
postgresql db: ${{ env.POSTGRES_DB }}
- run: cd Backend && go test ./...
- name: Setup test database
run: |
docker run -d --rm --name postgres_build_db \
-p $POSTGRES_PORT:5432 \
-e POSTGRES_USER=$POSTGRES_USER \
-e POSTGRES_PASSWORD=$POSTGRES_PASSWORD \
-e POSTGRES_DB=$POSTGRES_DB \
postgres:16
while [[ $(docker logs postgres_build_db 2>&1 | grep -c "database system is ready to accept connections") == 0 ]]; do
sleep 1;
done;
- name: Run Go Tests
run: cd Backend && go test ./...
- name: Shutdown Postgres DB
run: docker stop postgres_build_db