ci: set POSTGRES_HOST directly in workflow
Backend Tests / test (push) Failing after 1m1s

This commit is contained in:
2026-06-25 00:56:45 +01:00
parent ca86e223c0
commit 3cb6a7f6ad
2 changed files with 4 additions and 2 deletions
+1 -1
View File
@@ -62,7 +62,7 @@ jobs:
working-directory: backend
run: go test -tags "test,dev" -count=1 -v -timeout 120s ./handlers/... ./auth/... ./mw/... ./internal/... ./db/...
env:
TEST_DB_HOST: postgres
POSTGRES_HOST: postgres
PGUSER: myuser
PGPASSWORD: mypassword
PGDATABASE: mydb
+3 -1
View File
@@ -13,7 +13,9 @@ import (
func resetEnv() {
host := "localhost"
if h := os.Getenv("TEST_DB_HOST"); h != "" {
if h := os.Getenv("POSTGRES_HOST"); h != "" {
host = h
} else if h := os.Getenv("TEST_DB_HOST"); h != "" {
host = h
}
os.Setenv("POSTGRES_USER", "myuser")