-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Automate schema validation in a github workflow job #462
feat: Automate schema validation in a github workflow job #462
Conversation
60abecd
to
be39eee
Compare
@cjdcordeiro @tigarmo Ready for review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you have an example of the execution somewhere?
Yes, see here for instance. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM thanks
@linostar can you add a commit that breaks that example rockcraft.yaml so we can see what a validation failure looks like? |
Sure! missing_required_test, additional_field_test and invalid_schema_test. |
Looks great! thanks a lot |
A new job was added to
schema.yaml
workflow in order to automate the validation of Rockcraft schema.ajv-cli tool was used for validation. It is one of the fastest and most comprehensive JsonSchema validation tools. It was used with
--strict=false
option to allow"format": "uri"
in the schema.ajv-cli was able to detect validation errors similarly to JsonSchema-using IDEs like VS Code and PyCharm.