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_path
/go_cache /go_cache
key: go_path-${{ steps.hash-go.outputs.hash }} key: go_path-${{ steps.hash-go.outputs.hash }}
- uses: harmon758/postgresql-action@v1 - name: Setup test database
with: run: |
postgresql version: "16" docker run -d --rm --name postgres_build_db \
postgresql user: ${{ env.POSTGRES_USER }} -p $POSTGRES_PORT:5432 \
postgresql password: ${{ env.POSTGRES_PASSWORD }} -e POSTGRES_USER=$POSTGRES_USER \
postgresql db: ${{ env.POSTGRES_DB }} -e POSTGRES_PASSWORD=$POSTGRES_PASSWORD \
- run: cd Backend && go test ./... -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