ci: add schema validation for the default schema#53
Open
ivanauth wants to merge 1 commit into
Open
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #4.
Adds a CI job that validates the default SpiceDB schema in
scripts/schema.yaml. That file is a thumper script (aWriteSchemastep with a Go-templated schema), not a zed validation file, so the job renders the.Prefixtemplate and extracts the schema into a validation file before runningauthzed/action-spicedb-validate. Fails loudly if the script ever grows a secondWriteSchemastep.