From 1ca6d7b412503ab06ba656303c908bec95cabd49 Mon Sep 17 00:00:00 2001 From: Joshua Watt Date: Fri, 9 Aug 2024 10:23:05 -0600 Subject: [PATCH] gha: Use spdx3-validate to validate documents This validator correctly handles ExternalMap references --- .github/workflows/pull_request.yml | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index ca55f48..7c9e45d 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -60,9 +60,7 @@ jobs: - name: Setup Python tools run: | python3 -m pip install -U pip - python3 -m pip install \ - check-jsonschema \ - pyshacl + python3 -m pip install spdx3-validate - name: Validate SPDX 2.2 & SPDX 2.3 Documents run: | @@ -72,11 +70,8 @@ jobs: - name: Validate SPDX 3.0 Documents run: | - SPDX30_SCHEMA_URL="https://spdx.org/schema/3.0.0/spdx-json-schema.json" - SPDX30_SHACL_URL="https://spdx.org/rdf/3.0.0/spdx-model.ttl" - for f in $(find . -type f -path '*/spdx3.0/*.json'); do echo "Checking $f..." - check-jsonschema -v --schemafile $SPDX30_SCHEMA_URL $f - pyshacl -s $SPDX30_SHACL_URL -e $SPDX30_SHACL_URL $f + spdx3-validate -j $f done +