mirror of
https://github.com/hanzo-java/sdk.git
synced 2026-11-20 20:02:20 +00:00
The gate compiled the client and its examples and ran nothing. Seven tests against a local server now check the bearer and X-Org-Id, no credential on a route the document marks `security: []`, an unlisted response field landing in additionalProperties, a chat completion's body and routing headers, and a refusal's status and body. `sdk-test` runs them in the gate. Co-authored-by: Hanzo Dev <[email protected]>
71 lines
3.6 KiB
YAML
71 lines
3.6 KiB
YAML
# Hanzo CI — the ONE way this repo is gated, read by hanzoai/ci.
|
|
#
|
|
# No `images:` and no `deploy:`: this is a client library. A consumer resolves
|
|
# it at a version, so what CI owes is a gate and a jar, not a running service.
|
|
|
|
test:
|
|
- name: sdk-build
|
|
# 2,670 generated sources plus the one hand-written entry point, in one
|
|
# compile. If a regeneration produces something that does not compile, it
|
|
# must not reach a tag.
|
|
run: ./gradlew --no-daemon :hanzo-java-cloud:compileJava
|
|
|
|
- name: sdk-test
|
|
# What the client puts on the wire, against a local server: the bearer and
|
|
# X-Org-Id, no credential on a route the document marks public, a response
|
|
# that grows a field, a chat completion with its routing bounds, a refusal.
|
|
run: ./gradlew --no-daemon :hanzo-java-cloud:test
|
|
|
|
- name: examples-build
|
|
# The six canonical flows, compiled against the client they demonstrate. An
|
|
# example that does not compile is worse than no example, so they are gated
|
|
# rather than merely committed.
|
|
run: ./gradlew --no-daemon :examples:compileJava
|
|
|
|
- name: readme
|
|
# The coordinate the README prints is the release line this build publishes.
|
|
run: ./scripts/readme
|
|
|
|
binaries:
|
|
- name: hanzo-java-cloud
|
|
# Built on every push, published only on a tag. `publish` signs with the PGP
|
|
# key CI takes from KMS and uploads to Maven Central; the jar below is the
|
|
# same artifact, kept so a tag carries it even if the upload is unavailable.
|
|
run: ./gradlew --no-daemon :hanzo-java-cloud:assemble
|
|
out: hanzo-java-cloud/build/libs/*.jar
|
|
|
|
# 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, and
|
|
# NOTHING HAS EVER SENT the spec-update this repo listens for — to hanzoai/cloud
|
|
# `openapi.yaml`, emitted from the code by each app's own router and gated on
|
|
# every cloud release. 1,814 paths and 2,479 operations, identical to what
|
|
# api.hanzo.ai serves at /v1/openapi.json: a document the running code writes
|
|
# beats one a person maintains beside it.
|
|
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
|
|
# Where the number lives. A release hands the lane its own version, the cut
|
|
# writes it into build.gradle and tags it, and the push to main is what
|
|
# release.yml publishes to Maven Central. Without this key the cut tagged a
|
|
# build.gradle still naming the last release, Central already served that
|
|
# coordinate, and nothing published.
|
|
version: 'hanzo-java-cloud/build.gradle:./scripts/version'
|