fix: use ./... in CI and restore local dev host connection
Backend Tests / test (push) Successful in 1m3s
Backend Tests / test (push) Successful in 1m3s
CI test command: switch from explicit package list to ./... so new packages are automatically included. local-dev-2.sh: override POSTGRES_HOST=localhost for the host-side go run -tags dev ./main.go. The dev-tagged Connect() now reads POSTGRES_HOST from env (needed for CI where service containers use Docker DNS). Locally, .env sets POSTGRES_HOST=postgres, but that name only resolves inside Docker — not from the host where the dev server runs. Override to localhost so it connects via Docker's port forwarding.
This commit is contained in:
@@ -60,7 +60,7 @@ jobs:
|
||||
|
||||
- name: Test (all packages)
|
||||
working-directory: backend
|
||||
run: go test -tags "test,dev" -count=1 -v -timeout 120s ./handlers/... ./auth/... ./mw/... ./internal/... ./db/...
|
||||
run: go test -tags "test,dev" -count=1 -v -timeout 180s ./...
|
||||
env:
|
||||
POSTGRES_HOST: postgres
|
||||
TEST_DB_HOST: postgres
|
||||
|
||||
Reference in New Issue
Block a user