Skip to content

Commit

Permalink
gha: Use spdx3-validate to validate documents
Browse files Browse the repository at this point in the history
This validator correctly handles ExternalMap references
  • Loading branch information
JPEWdev committed Aug 9, 2024
1 parent 9e78e8c commit f93717d
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,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: |
Expand All @@ -60,11 +58,7 @@ 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 '*/spdx-3.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

0 comments on commit f93717d

Please sign in to comment.