feat: 完善自动化脚本,添加测试命令和使用说明

This commit is contained in:
fish
2026-03-28 20:05:39 +08:00
parent 144dec7039
commit e4bb25d1ac
2 changed files with 15 additions and 1 deletions

View File

@@ -12,6 +12,7 @@ help:
@echo " make down - 停止所有服务"
@echo " make logs - 查看所有服务日志"
@echo " make gen-proto - 生成 proto 文件"
@echo " make test - 运行所有服务的测试"
@echo " make clean - 清理构建文件"
# 构建所有服务
@@ -39,6 +40,14 @@ gen-proto:
@echo "Generating proto files..."
docker compose run --rm proto-builder
# 运行所有服务的测试
test:
@echo "Running tests..."
# 运行网关服务测试
docker compose run --rm gateway go test ./...
# 运行用户服务测试
docker compose run --rm user-svc go test ./...
# 清理构建文件
clean:
docker compose down -v