Skip to content

Commit 7ac2e2c

Browse files
committed
Set database URIs in CI to bypass Docker fallback
The test infrastructure checks if Docker is available before trying native databases. Since GitHub Actions runners have Docker installed, tests were trying to start MySQL/PostgreSQL via Docker instead of using the databases already started by sqlc-test-setup. Setting POSTGRESQL_SERVER_URI and MYSQL_SERVER_URI explicitly ensures tests connect to the native databases. https://claude.ai/code/session_01CsyRwSkRxBcQoaQFVkMQsJ
1 parent 98f0aff commit 7ac2e2c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ jobs:
6262
CI_SQLC_PROJECT_ID: ${{ secrets.CI_SQLC_PROJECT_ID }}
6363
CI_SQLC_AUTH_TOKEN: ${{ secrets.CI_SQLC_AUTH_TOKEN }}
6464
SQLC_AUTH_TOKEN: ${{ secrets.CI_SQLC_AUTH_TOKEN }}
65+
POSTGRESQL_SERVER_URI: "postgres://postgres:postgres@127.0.0.1:5432/postgres?sslmode=disable"
66+
MYSQL_SERVER_URI: "root:mysecretpassword@tcp(127.0.0.1:3306)/mysql?multiStatements=true&parseTime=true"
6567
CGO_ENABLED: "0"
6668

6769
vuln_check:

0 commit comments

Comments
 (0)