Skip to content

ci: add schema validation for the default schema#53

Open
ivanauth wants to merge 1 commit into
authzed:mainfrom
ivanauth:ci/issue-4-schema-validation
Open

ci: add schema validation for the default schema#53
ivanauth wants to merge 1 commit into
authzed:mainfrom
ivanauth:ci/issue-4-schema-validation

Conversation

@ivanauth

Copy link
Copy Markdown

Fixes #4.

Adds a CI job that validates the default SpiceDB schema in scripts/schema.yaml. That file is a thumper script (a WriteSchema step with a Go-templated schema), not a zed validation file, so the job renders the .Prefix template and extracts the schema into a validation file before running authzed/action-spicedb-validate. Fails loudly if the script ever grows a second WriteSchema step.

Add a workflow that validates the default SpiceDB schema embedded in
scripts/schema.yaml. The file is a thumper script (not a zed validation
file) whose WriteSchema step holds the schema as a Go template, so the
workflow renders the template with an empty prefix, extracts the schema
with yq into a generated validation file, and runs
authzed/action-spicedb-validate on it.

The root schema.yaml is the JSON Schema for thumper scripts, not a
SpiceDB schema, and is deliberately not validated here.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add schema validation CI for the default schema

1 participant