feat: jargon artifacts validation pipeline
Created by: huynguyen-hl
What type of PR is this? (check all applicable)
-
🍕 Feature -
🐛 Bug Fix -
📝 Documentation Update -
🎨 Style -
🧑 💻 Code Refactor -
🔥 Performance Improvements -
✅ Test -
🤖 Build -
🔁 CI -
📦 Chore (Release) -
⏩ Revert
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 the validate-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:
- Sample credential did not conform to its schema.
- Context in the sample credential failed due to protected term redefinition.
- Context contained an invalid term.
All test cases passed successfully: