mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
hanzoai/ci defaults client.spec.repo to hanzoai/cloud, and that path now serves the re-rooted OSS core -- twelve commits, no ancestor in common with the product, and no openapi.yaml at all. Every run of the client lane has 404'd since the repoint, check and move alike, in a way that reads as a credential fault. The product line is what this SDK projects, so it is what is named. Co-authored-by: Hanzo Dev <[email protected]>
65 lines
2.8 KiB
YAML
65 lines
2.8 KiB
YAML
# Hanzo CI — the ONE way this repo is gated, read by hanzoai/ci.
|
|
#
|
|
# No `images:` and no `deploy:`: this is a Go library. A consumer links it from
|
|
# the module proxy at a tag, so what CI owes is a gate, not an artifact.
|
|
# Publishing is `.hanzo/workflows/release.yml` — for a Go module that means
|
|
# pushing a semver tag and warming the proxy, no registry token involved.
|
|
|
|
test:
|
|
- name: go-build
|
|
# The generated client is 2656 files in one package; if a regeneration
|
|
# produces something that does not compile, it must not reach a tag.
|
|
run: |
|
|
set -e
|
|
export GOWORK=off
|
|
go build ./...
|
|
- name: go-vet
|
|
run: |
|
|
set -e
|
|
export GOWORK=off
|
|
go vet ./...
|
|
- name: go-test
|
|
# hanzo_test.go pins the six canonical example flows to the routes
|
|
# openapi.yaml documents, and asserts the client actually sends the bearer
|
|
# token. Those two facts are the whole contract of a generated SDK.
|
|
run: |
|
|
set -e
|
|
export GOWORK=off
|
|
go test -count=1 ./...
|
|
- name: examples-build
|
|
# The six flows are the same journeys in every Hanzo SDK. An example that
|
|
# does not compile is worse than no example, so they are gated, not just
|
|
# committed.
|
|
run: |
|
|
set -e
|
|
export GOWORK=off
|
|
go build ./examples/...
|
|
# THE CLIENT LANE — this repo is a PROJECTION of one API document at one version.
|
|
#
|
|
# hanzoai/cloud's release sends `repository_dispatch: spec-update` carrying
|
|
# (version, sha, spec_sha256); hanzoai/ci fetches openapi.yaml AT THAT SHA,
|
|
# REFUSES if the bytes hash to anything else, runs `generate:`, writes
|
|
# `.spec-lock` beside the code, and — only after the `test:` block below has
|
|
# passed over exactly those bytes — commits and cuts a patch.
|
|
#
|
|
# The document moved from hanzoai/openapi `hanzo.yaml` (hand-merged, fed by
|
|
# nothing, and NOTHING HAS EVER SENT the spec-update this repo listens for) to
|
|
# hanzoai/cloud `openapi.yaml` — 1814 paths and 2479 operations, emitted from
|
|
# the code by each app's own router and gated on every cloud release. A true
|
|
# document beats an unverified one at any size.
|
|
client:
|
|
# WHICH cloud, said out loud. hanzoai/ci defaults this to `hanzoai/cloud`, and
|
|
# that path now serves the re-rooted OSS core -- a twelve-commit line sharing no
|
|
# ancestor with the product, and carrying no openapi.yaml at all. So the fetch
|
|
# 404s for every ref this projection could name, on check and move alike, and
|
|
# has since the repoint. It reads as a credential fault and is not one.
|
|
#
|
|
# The product line is what this SDK is a projection of, so it is what is named.
|
|
# `.spec-lock`'s own repo= line does NOT set this -- ci reads the repo from here
|
|
# and uses the lock's copy for a commit message -- so the two can disagree in
|
|
# silence. They are one fact; keep them equal.
|
|
spec:
|
|
repo: hanzo-inc/cloud
|
|
generate: ./scripts/generate.sh
|
|
version: 'tag'
|