feat: Urutau 1.0.0, lightweight threat intelligence and web analytics
Release / Plan (reuse the published image?) (push) Successful in 4s
CI / Docker image (build and smoke test) (push) Skipped
CI / Format and vet (push) Successful in 1m29s
CI / Tests (Linux, race detector) (push) Failing after 1m48s
CI / Dependency audit (push) Successful in 21s
Release / ci (push) Failing after 1m50s
Release / Build image (amd64) (push) Skipped
Release / Build image (arm64) (push) Skipped
Release / Publish tags (push) Skipped
Release / Gitea release (push) Skipped
Release / Plan (reuse the published image?) (push) Successful in 4s
CI / Docker image (build and smoke test) (push) Skipped
CI / Format and vet (push) Successful in 1m29s
CI / Tests (Linux, race detector) (push) Failing after 1m48s
CI / Dependency audit (push) Successful in 21s
Release / ci (push) Failing after 1m50s
Release / Build image (amd64) (push) Skipped
Release / Build image (arm64) (push) Skipped
Release / Publish tags (push) Skipped
Release / Gitea release (push) Skipped
Always-on Go service (stdlib only) that follows the Traefik JSON access log, the sshd log and the fail2ban log of a host, classifies attacks, scores sources, keeps bounded aggregates with snapshots, and serves an embedded dashboard with live updates, offline geolocation (DB-IP Lite), privacy-friendly traffic analytics, an exportable blocklist and token-authenticated federation between instances. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
commit
b4a2c2c9ec
99 files changed
+15403
No files matched your search
Executable
+74
@@ -0,0 +1,74 @@
|
||||
#!/usr/bin/env bash
|
||||
# Local verification: runs the same checks as CI before pushing. Anything the
|
||||
# machine lacks (go, node, docker, govulncheck) is skipped with a warning.
|
||||
#
|
||||
# scripts/check.sh fast: gofmt, go vet, i18n, scripts, workflows, compose
|
||||
# scripts/check.sh --full also runs go test -race and govulncheck
|
||||
#
|
||||
# CI takes minutes per run; almost everything that breaks it is caught here
|
||||
# in seconds.
|
||||
set -uo pipefail
|
||||
cd "$(dirname "$0")/.."
|
||||
full=0
|
||||
[ "${1:-}" = "--full" ] && full=1
|
||||
failures=()
|
||||
step() { # step "name" command...
|
||||
local name="$1"; shift
|
||||
printf '\n\033[1m== %s\033[0m\n' "$name"
|
||||
if "$@"; then printf '\033[32mok\033[0m %s\n' "$name"; else printf '\033[31mFAILED\033[0m %s\n' "$name"; failures+=("$name"); fi
|
||||
}
|
||||
skip() { printf '\n\033[33mskipped\033[0m %s (%s)\n' "$1" "$2"; }
|
||||
|
||||
if command -v go >/dev/null; then
|
||||
step "formatting (gofmt)" bash -c 'out=$(gofmt -l .); [ -z "$out" ] || { echo "$out"; exit 1; }'
|
||||
step "go vet" go vet ./...
|
||||
else
|
||||
skip "gofmt and go vet" "go not installed"
|
||||
fi
|
||||
|
||||
if command -v node >/dev/null; then
|
||||
step "UI translation coverage" node scripts/check-ui-i18n.mjs
|
||||
else
|
||||
skip "UI translation coverage" "node not installed"
|
||||
fi
|
||||
|
||||
step "bash script syntax" bash -c 'for f in scripts/*.sh .githooks/*; do bash -n "$f" || exit 1; done'
|
||||
|
||||
if python3 -c 'import yaml' 2>/dev/null; then
|
||||
step "workflows and templates (valid YAML)" python3 -c "
|
||||
import glob, yaml
|
||||
for f in glob.glob('.gitea/**/*.yml', recursive=True):
|
||||
yaml.safe_load(open(f))
|
||||
"
|
||||
else
|
||||
skip "workflows and templates (valid YAML)" "PyYAML missing: pip install pyyaml"
|
||||
fi
|
||||
|
||||
step "brand assets" test -s logo.png
|
||||
|
||||
if command -v docker >/dev/null && docker compose version >/dev/null 2>&1; then
|
||||
step "docker compose config" docker compose config --quiet
|
||||
else
|
||||
skip "docker compose config" "docker compose not available"
|
||||
fi
|
||||
|
||||
if [ "$full" = 1 ]; then
|
||||
if command -v go >/dev/null; then
|
||||
step "tests (go test -race)" go test -race ./...
|
||||
if command -v govulncheck >/dev/null; then
|
||||
step "dependency audit (govulncheck)" govulncheck ./...
|
||||
else
|
||||
skip "govulncheck" "install: go install golang.org/x/vuln/cmd/govulncheck@latest"
|
||||
fi
|
||||
else
|
||||
skip "tests and govulncheck" "go not installed"
|
||||
fi
|
||||
fi
|
||||
|
||||
printf '\n'
|
||||
if [ ${#failures[@]} -eq 0 ]; then
|
||||
printf '\033[32mall checks passed\033[0m: ready to push.\n'
|
||||
else
|
||||
printf '\033[31mfailed:\033[0m %s\n' "${failures[*]}"
|
||||
exit 1
|
||||
fi
|
||||
Reference in new issue
Block a user