Skip to content

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:

Screenshot 2025-02-13 at 4 18 43 PM

Pipeline skipped validation upon receiving a test event:

Screenshot 2025-02-13 at 4 05 13 PM

Sample credential validation failed due to a missing required issuer property:

Screenshot 2025-02-13 at 4 06 17 PM

Context validation in the credential failed because the protected term cnf was redefined:

Screenshot 2025-02-13 at 4 06 51 PM

Context artifact validation failed due to an invalid term ("": ""):

Screenshot 2025-02-13 at 4 07 14 PM

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.
Screenshot 2025-02-13 at 4 07 32 PM

All test cases passed successfully:

Screenshot 2025-02-13 at 4 07 56 PM

Merge request reports

Loading