-
Notifications
You must be signed in to change notification settings - Fork 31
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: jargon artifacts validation pipeline #304
feat: jargon artifacts validation pipeline #304
Conversation
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.
Looks excellent @huynguyen-hl . I'm just a bit confused about what is going on in one of the functions below. Can you clarify that for me? Otherwise +1
.github/actions/validate-jargon-artefacts/src/contextValidation.js
Outdated
Show resolved
Hide resolved
β¦g and improved context validation
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.
Great work Huy.
* @returns {schemas: {fileName: url}, instances: {fileName: url}} | ||
*/ | ||
|
||
function splitSchemasAndInstances (jsonSchemas) { |
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.
As @absoludity mentioned, I feel that we should update the naming convention, but it's good enough for now.
What type of PR is this? (check all applicable)
Description
This PR implements the GitHub workflow
jargon-webhooks
pipeline, which is triggered when a Jargon snapshot is created.To set up the webhook, we need to navigate to the specific domain on the Jargon site where we want to configure it, then set up the GitHub dispatch URL and HTTP headers accordingly. Once configured, every time a snapshot is created, Jargon will send a request to the GitHub API to trigger this pipeline and validate its artifacts.
The
jargon-webhooks
pipeline leverages thevalidate-jargon-artifacts
action to validate JSON-LD contexts and sample credentials against their respective schemas and contexts used within the credentials. This ensures that we can easily determine whether the generated artifacts are valid before proceeding with their release.Screenshots
Below are some screenshots of my testing for the
jargon-webhooks
pipeline to ensure it works as expected.Jargon webhook configuration:
Pipeline skipped validation upon receiving a test event:
Sample credential validation failed due to a missing required
issuer
property:Context validation in the credential failed because the protected term
cnf
was redefined:Context artifact validation failed due to an invalid term ("": ""):
The pipeline detected all failed test cases:
All test cases passed successfully: