fix(ci): B5 整合測試改用 docker exec psql,不依賴主機 psql 指令
Some checks failed
CD Pipeline / build-and-deploy (push) Failing after 1m50s
Some checks failed
CD Pipeline / build-and-deploy (push) Failing after 1m50s
runner 環境無 psql binary (exitcode 127) 改為從 postgres-test container 內執行 psql,透過 stdin 傳入 SQL Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -129,9 +129,10 @@ jobs:
|
||||
run: |
|
||||
cd apps/api
|
||||
docker compose -f docker-compose.test.yml up -d --wait
|
||||
PGPASSWORD=awoooi_test_2026 psql \
|
||||
"postgresql://awoooi@127.0.0.1:15432/awoooi_test" \
|
||||
-f tests/integration/setup_test_schema.sql -q
|
||||
# psql 從 postgres container 執行,不需要主機安裝 psql
|
||||
docker compose -f docker-compose.test.yml exec -T postgres-test \
|
||||
psql -U awoooi -d awoooi_test \
|
||||
-f /dev/stdin < tests/integration/setup_test_schema.sql
|
||||
TEST_DATABASE_URL="postgresql+asyncpg://awoooi:awoooi_test_2026@127.0.0.1:15432/awoooi_test" \
|
||||
python3.11 -m pytest tests/integration/test_b5_core_flows.py -v --tb=short
|
||||
TEST_EXIT=$?
|
||||
|
||||
Reference in New Issue
Block a user