chore: prepare repository for publishing
Some checks failed
CI / test (push) Has been cancelled

This commit is contained in:
phamnazage-jpg
2026-05-13 14:42:45 +08:00
parent 55e506b2b5
commit 77e6610fd2
118 changed files with 27373 additions and 1009 deletions

32
scripts/verify_phase2.sh Executable file
View File

@@ -0,0 +1,32 @@
#!/bin/bash
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
. "$SCRIPT_DIR/verify_common.sh"
echo "=== Phase 2 验收检查 ==="
check_shell "ProviderMapper 单元测试通过" "go test ./internal/collectors/..."
check_shell "重试组件单元测试通过" "go test ./internal/retry/..."
check_shell "OpenRouter 采集器可独立构建" "go build -o /dev/null ./scripts/fetch_openrouter.go"
check_sql_int_ge "国内厂商种子数不少于 7 家" \
"select count(*) from model_provider where country='CN';" \
7
check_sql_int_ge "国内厂商模型数不少于 10 条" \
"select count(*) from models m join model_provider p on m.provider_id = p.id where p.country='CN';" \
10
check_sql_int_ge "CNY 定价记录不少于 10 条" \
"select count(*) from region_pricing where currency='CNY';" \
10
check_sql_int_ge "采集成功统计记录至少 1 条" \
"select count(*) from collector_stats where success = true;" \
1
check_sql_int_ge "models 总量达到 371+" \
"select count(*) from models where deleted_at is null;" \
371
check_sql_int_ge "models 审计日志达到 371+" \
"select count(*) from audit_log where table_name='models';" \
371
finish_phase