Files
OpenFlare/.auto/checks.sh
T
ryan f5c9da03f4 前端测试套件 44 失败→全绿:10 个测试文件补 NextIntlClientProvider 包装(含 React19 createElement 类型修复、.ts→.tsx 重命名);修复真实 i18n ICU bug(githubUrlInvalid 的 {owner}/{repo} 未转义导致生产渲染成 key,zh/en + fragment 4 文件同步转义);更新 2 处过期测试期望。vitest 116/116 + tsc + eslint 全绿,checks.sh 增加前端测试门禁。
Result: {"status":"keep","total_issues":8,"golint_canonicalheader":0,"golint_errname":0,"golint_errorlint":1,"golint_exhaustive":0,"golint_forcetypeassert":0,"golint_gosec":0,"golint_intrange":0,"golint_modernize":3,"golint_nilnil":3,"golint_perfsprint":0,"golint_prealloc":0,"golint_recvcheck":1,"golint_usestdlibvars":0,"golint_wastedassign":0,"golint_total":8,"golint_test_testifylint":0,"golint_test_thelper":0,"golint_test_usetesting":0,"golint_test_total":0,"golint_vetx_total":0,"eslint_problems":0,"eslint_errors":0,"eslint_warnings":0,"tsc_errors":0,"measure_s":39}
2026-08-16 19:08:21 +08:00

32 lines
914 B
Bash
Executable File
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/bin/bash
# Correctness gate: must pass after every edit. Fails fast on real breakage.
set -euo pipefail
cd "$(dirname "$0")/.."
echo "==> go vet ./..."
go vet ./... 2>&1 | tail -20
echo "==> go build ./..."
go build ./... 2>&1 | tail -20
echo "==> golangci-lint run (repo config)"
golangci-lint run 2>&1 | tail -20
# 全量单测(sqlite + miniredis,纯本地无需外部服务;2026-08-16 起全绿)
echo "==> go test ./internal/... ./pkg/..."
go test ./internal/... ./pkg/... 2>&1 | grep -E "^--- FAIL|^FAIL" | head -20 || true
if go test ./internal/... ./pkg/... > /tmp/auto_gotest.log 2>&1; then
:
else
tail -30 /tmp/auto_gotest.log
exit 1
fi
# 前端测试(vitest;2026-08-16 起全绿)
echo "==> pnpm exec vitest run (frontend)"
(cd frontend && pnpm exec vitest run --reporter=dot > /tmp/auto_vitest.log 2>&1) || {
tail -30 /tmp/auto_vitest.log
exit 1
}
echo "OK: checks passed"