oficina / suite Public

Run suite module and conformance checks in CI

Check tracked Go formatting, vet, cgo-free build, and uncached tests. Preserve a configured GOCACHE; clean up only the temporary cache created by this gate.

Validation: bad formatting and a deliberately broken VISIBLE constant each failed the gate with exit 1; a failed go tool propagated exit 42. Restored source passes the gate.
Paul Campbell pushed by paul@keymail.dev 75fe0db64ff7478b5f0bd1d359bf1238a0eb5bcf parent 60b01a8
1 file changed, +19 −0
  • .amadan/ci.d/10-gate +19 −0

CI passed — run details

CI log
=== gate ===
ok  	amadan.net/oficina/suite	0.006s
ok  	amadan.net/oficina/suite/conformance	0.004s
diff --git a/.amadan/ci.d/10-gate b/.amadan/ci.d/10-gate
new file mode 100755
index 0000000..60c44a4
--- /dev/null
+++ b/.amadan/ci.d/10-gate
@@ -0,0 +1,19 @@
+#!/usr/bin/env bash
+set -euo pipefail
+
+export CGO_ENABLED=0
+if [ -z "${GOCACHE:-}" ]; then
+ suite_gate_cache="$(mktemp -d)"
+ export GOCACHE="$suite_gate_cache"
+ trap 'rm -rf -- "$suite_gate_cache"' EXIT
+fi
+
+unformatted="$(git ls-files -z -- '*.go' | xargs -0 -r gofmt -l)"
+if [ -n "$unformatted" ]; then
+ printf '%s\n' "$unformatted" >&2
+ exit 1
+fi
+
+go vet ./...
+go build ./...
+go test -count=1 ./...