mirror of
https://github.com/hanzoai/notify.git
synced 2026-10-30 15:04:32 +00:00
release.yml owned the image on paper and produced none. Its build matrix asked for `hanzoai-arm64`, which no runner in this fleet advertises, so the arm64 leg never dispatched and the manifest merge that needed both arches never ran; it also cached through `type=gha`, which the forge's token is not. Its last run was cancelled, and no tag of this repo has an image behind it. It was dark on the forge anyway — .hanzo/workflows exists, so .github/workflows is not read. So the image moves into hanzo.yml, where the one caller this repo has already looks, and hanzoai/ci builds it the way it builds every other: one amd64 image, a v* tag publishing the semver the CRs pin, and an immutable sha-<short7> beside it. The Dockerfile stamped `-X main.version=dev` unless something passed VERSION, and nothing in the new lane does. It now defaults VERSION to REVISION, which hanzoai/ci passes on every build, so the binary reports the commit it was built from rather than the word "dev". codeql.yml goes. github/codeql-action uploads SARIF to GitHub code scanning; there is no such surface here, which is why its last four runs on the forge were skipped or failed. Capability dropped: arm64 images (no runner) and CodeQL scanning (no receiver). Restoring arm64 is a `platforms:` line, not a workflow.
48 lines
2.3 KiB
YAML
48 lines
2.3 KiB
YAML
# hanzoai/notify — the multi-channel notification library/service (Go).
|
|
#
|
|
# The image is declared here now. It used to be release.yml's, and release.yml
|
|
# could not build it: half its matrix asked for `hanzoai-arm64`, a label no
|
|
# runner in this fleet advertises, so the arm64 leg never dispatched and the
|
|
# manifest-merge job that needed both arches never ran. It also cached through
|
|
# `type=gha`, which the forge's token cannot satisfy. Its last run was cancelled
|
|
# and there is no image behind any tag of this repo.
|
|
#
|
|
# amd64 only, because that is what the fleet is. The Dockerfile is already
|
|
# TARGETARCH-parameterised, so restoring arm64 is a `platforms:` line here the
|
|
# day a runner answers for it — not a second workflow.
|
|
#
|
|
# This is the repo's `make test` inlined — build the whole tree, then the suite
|
|
# with -failfast -race. Written out rather than shelling to make because
|
|
# hanzo.yml is read by the runner and by platform.hanzo.ai and neither is
|
|
# promised a make binary.
|
|
#
|
|
# -race matters for this repo specifically: Notify fans a single Send out to
|
|
# every registered service concurrently and collects errors, so the fan-out is
|
|
# the product. A race there drops or duplicates a notification, which no
|
|
# assertion about the return value can see.
|
|
#
|
|
# The suite runs in two parts, and the split is the race detector: it needs cgo,
|
|
# and the two packages that start a Base app cannot run under cgo. Base refuses
|
|
# a SQLite without math functions ("no such function: acos") and the cgo build
|
|
# has none, which is why a single -race run over ./... fails 30-odd route and
|
|
# task tests that have nothing to do with concurrency.
|
|
#
|
|
# So each half runs the way it can: the race detector over everything it can
|
|
# reach — which is where the fan-out lives — and the two Base-backed packages
|
|
# with CGO_ENABLED=0, exactly how the Dockerfile builds the shipping binary.
|
|
# No build tag: a tagged cgo SQLite would be a third build that nothing ships.
|
|
images:
|
|
- name: notify
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
repo: ghcr.io/hanzoai/notify
|
|
|
|
test:
|
|
- name: build-and-test
|
|
run: |
|
|
set -e
|
|
go build ./...
|
|
go test -failfast -race -count=1 -timeout=10m \
|
|
$(go list ./... | grep -vE '/internal/(routes|tasks)$')
|
|
CGO_ENABLED=0 go test -failfast -count=1 -timeout=10m ./internal/routes ./internal/tasks
|