From 93fb0c40164f42ed7ca32da013ace09db41aa980 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C3=A8r=20Kessels?= Date: Thu, 12 Sep 2024 16:04:55 +0200 Subject: [PATCH] feat: Run boon validation tests on all JSON files Check them against obv3 --- .github/workflows/test.yml | 26 ++++++++++++++++++++++++++ extracurriculair_minimal.json | 2 +- 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..b83e032 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,26 @@ +name: Test + +on: + push: + branches: [ "main" ] + +jobs: + verify-json-validation: + runs-on: ubuntu-latest + steps: + - name: Check out repository + uses: actions/checkout@v3 + + - name: Log in to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Run Boon Command + uses: addnab/docker-run-action@v3 + with: + image: ghcr.io/${{ github.repository_owner }}/boon:latest + options: --rm + run: boon --assert-content schemas/ob_v3p0_achievementcredential_schema.json *.json diff --git a/extracurriculair_minimal.json b/extracurriculair_minimal.json index 39351af..933da5b 100644 --- a/extracurriculair_minimal.json +++ b/extracurriculair_minimal.json @@ -16,7 +16,7 @@ "type": [ "Profile" ], - "name": "Naboo Theed University", + "name": "Naboo Theed University" }, "validFrom": "2014-06-01T00:00:00Z", "name": "Example Extra-Curricular Achievement",