Skip to content

Commit

Permalink
Test validation of ttl file #29
Browse files Browse the repository at this point in the history
  • Loading branch information
sroertgen committed Mar 19, 2024
1 parent 464b355 commit 9912319
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ jobs:
# Adjust the file path to remove the './' part
adjusted_file_path=$(echo "$file" | sed 's|^./||')
echo "Processing $adjusted_file_path with Docker..."
docker run --rm -v "$file:/data/$adjusted_file_path" skohub/jena:4.6.1 "shacl validate --shapes https://raw.githubusercontent.com/skohub-io/shapes/main/skohub.shacl.ttl --data /data/$adjusted_file_path"
docker run --rm -v "$(pwd)/$adjusted_file_path:/rdf/test.ttl" skohub/jena:4.6.1 riot --validate /rdf/test.ttl
result="$(docker run --rm -v "$(pwd)/$adjusted_file_path:/rdf/test.ttl" skohub/jena:4.6.1 shacl validate --shapes https://raw.githubusercontent.com/skohub-io/shapes/main/skohub.shacl.ttl --data /rdf/test.ttl)"
echo $result > result.ttl
curl -s https://raw.githubusercontent.com/skohub-io/shapes/main/scripts/checkForWarning.rq >> checkForWarning.rq
validationResult="$(docker run --rm --mount type=bind,source=./checkForWarning.rq,target=/rdf/checkForViolation.rq --mount type=bind,source=./result.ttl,target=/rdf/result.ttl skohub/jena:4.6.1 arq --data /rdf/result.ttl --query /rdf/checkForViolation.rq)"
echo $validationResult
done

0 comments on commit 9912319

Please sign in to comment.