aboutsummaryrefslogtreecommitdiff
path: root/check
diff options
context:
space:
mode:
authorGravatar Runxi Yu2026-05-29 06:43:43 +0000
committerGravatar Runxi Yu2026-05-29 06:43:43 +0000
commit3b21da3051c2f4d899da5aac021f646fc28acea9 (patch)
treed5f51066fa73322843697afa7cedc290d4b50545 /check
parentFix badge (diff)
signatureNo signature
ci: Simplify with a local script
Diffstat (limited to 'check')
-rwxr-xr-xcheck29
1 files changed, 29 insertions, 0 deletions
diff --git a/check b/check
new file mode 100755
index 00000000..d5951a40
--- /dev/null
+++ b/check
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+llmagent() {
+ printf >&2 'LLM agents are not allowed in this project.\n'
+ exit 1
+}
+
+[ "${CODEX_MANAGED_PACKAGE_ROOT+set}" = set ] && llmagent
+[ "${CODEX_MANAGED_BY_NPM+set}" = set ] && llmagent
+[ "${CODEX_THREAD_ID+set}" = set ] && llmagent
+[ "${CODEX_CI+set}" = set ] && llmagent
+[ "${CODEX_SANDBOX_NETWORK_DISABLED+set}" = set ] && llmagent
+[ "${AI_AGENT+set}" = set ] && llmagent
+[ "${CLAUDECODE+set}" = set ] && llmagent
+[ "${CLAUDE_CODE_ENTRYPOINT+set}" = set ] && llmagent
+[ "${CLAUDE_CODE_EXECPATH+set}" = set ] && llmagent
+[ "${CLAUDE_CODE_SESSION_ID+set}" = set ] && llmagent
+[ "${CLAUDE_CODE_TMPDIR+set}" = set ] && llmagent
+
+set -eux
+
+go build ./...
+go test -count 1 $(go list ./... | grep -v '/internal/compress')
+go test -race -count 1 $(go list ./... | grep -v '/internal/compress')
+go test -tags purego -count 1 $(go list ./... | grep -v '/internal/compress')
+golangci-lint run ./...
+go vet ./...
+test -z "$(gofmt -l .)"
+test -z "$(go fix -diff ./...)"