完善本地质量门禁与资金链路测试

This commit is contained in:
yml2213
2026-09-02 13:50:19 +08:00
parent dd2b45bd2c
commit 208f12ddb4
80 changed files with 12245 additions and 11541 deletions
+4 -2
View File
@@ -97,7 +97,7 @@ if [[ "${SKIP_BACKEND}" == "0" ]]; then
run_step "go build ./..." go build ./... || FAILED=1
if [[ "${SKIP_TESTS}" == "0" ]]; then
# -p 1 串行避免 SQLite 内存库并发; 真实 MySQL e2e 默认 skip
run_step "go test ./..." go test -p 1 -count=1 ./... || FAILED=1
run_step "go test + coverage" bash "${ROOT_DIR}/scripts/check-backend-coverage.sh" || FAILED=1
else
log_warn "跳过后端测试 (--skip-tests)"
fi
@@ -112,6 +112,8 @@ if [[ "${SKIP_FRONTEND}" == "0" ]]; then
log "前端检查目录: ${FRONTEND_DIR}"
cd "${FRONTEND_DIR}"
run_step "Vue 页面大小门禁" bash "${ROOT_DIR}/scripts/check-vue-size.sh" || FAILED=1
if [[ ! -d node_modules ]]; then
run_step "npm ci (首次安装依赖)" npm ci || FAILED=1
fi
@@ -119,7 +121,7 @@ if [[ "${SKIP_FRONTEND}" == "0" ]]; then
# npm run check = prettier --check + eslint --max-warnings=0 + vue-tsc
run_step "npm run check (prettier + eslint + typecheck)" npm run check || FAILED=1
if [[ "${SKIP_TESTS}" == "0" ]]; then
run_step "npm run test (vitest)" npm run test || FAILED=1
run_step "npm run test + coverage (vitest)" npm run test:coverage || FAILED=1
else
log_warn "跳过前端测试 (--skip-tests)"
fi