mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-09-29 05:56:38 +08:00
f5c9da03f4
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}
32 lines
914 B
Bash
Executable File
32 lines
914 B
Bash
Executable File
#!/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" |