build: 加 make test/test-go/test-web/test-py 一键测试目标
- test-go: 各 Go 模块 go test(DB 集成测试无 MEMORY_TEST_DSN 自动跳过) - test-web: 前端 tsc 类型检查 - test-py: mcp-py 沙箱守卫测试(pytest 缺则用内置 harness 兜底) - test = test-go + test-web Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
.PHONY: infra infra-down devnats demo e2e gateway dispatcher mcp-go mcp-py mcp-py-setup web admin desktop desktop-build tidy
|
||||
.PHONY: infra infra-down devnats demo e2e test test-go test-web test-py gateway dispatcher mcp-go mcp-py mcp-py-setup web admin desktop desktop-build tidy
|
||||
|
||||
infra: ## 启动基础设施 (NATS / Postgres / Redis / Milvus / Neo4j)
|
||||
docker compose up -d
|
||||
@@ -15,6 +15,23 @@ demo: ## 一键演示 Gateway→NATS→Dispatcher 任务流(无需 Doc
|
||||
e2e: ## 跑共享 bus 的端到端测试(内嵌 NATS):任务流 / 工具调用 / Token 流
|
||||
cd sundynix-shared && go test ./bus/ -run 'TestTaskRoundTrip|TestToolCallRoundTrip|TestTokenStreamRoundTrip' -v
|
||||
|
||||
test: test-go test-web ## 跑全部测试(后端各模块 go test + 前端类型检查)
|
||||
|
||||
test-go: ## 各 Go 模块单测(DB 集成测试无 MEMORY_TEST_DSN 自动跳过)
|
||||
cd sundynix-shared && go test ./...
|
||||
cd sundynix-gateway && go test ./...
|
||||
cd sundynix-dispatcher && go test ./...
|
||||
cd sundynix-mcp-go && go test ./...
|
||||
|
||||
test-web: ## 前端 TypeScript 类型检查
|
||||
cd sundynix-desktop/frontend && npx tsc --noEmit
|
||||
|
||||
test-py: ## mcp-py 沙箱守卫测试(需 venv;缺 pytest 用内置 harness 兜底)
|
||||
cd sundynix-mcp-py && ( PYTHONPATH=src:tests .venv/bin/python -m pytest tests/ -q 2>/dev/null \
|
||||
|| PYTHONPATH=src:tests .venv/bin/python -c "import test_sandbox as t; \
|
||||
fns=[getattr(t,n) for n in dir(t) if n.startswith('test_')]; \
|
||||
[ (f(),print('PASS',f.__name__)) for f in fns ]; print(f'{len(fns)} passed')" )
|
||||
|
||||
gateway:
|
||||
cd sundynix-gateway && go run ./cmd/server
|
||||
|
||||
|
||||
Reference in New Issue
Block a user