Skip to content

split up abox shacl workflow #19

split up abox shacl workflow

split up abox shacl workflow #19

name: shacl validation of abox
on:
push:
branches:
- develop-3.0.0
jobs:
aboxshacl:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: develop-3.0.0
path: main
- name: Merge and reason
run: |
curl -L -o robot.jar "https://github.com/ontodev/robot/releases/latest/download/robot.jar"
java -jar robot.jar merge --input main/pmd-core.ttl --output pmd-core-merged.ttl
java -jar robot.jar reason --reasoner elk --input pmd-core-merged.ttl --output pmd-core-reasoned.ttl
- name: pyshacl
run: |
trap 'E=$?; test $E -eq 1 && echo "trapped exit code 1" && exit 0 || exit $E' EXIT
python3 -m pyshacl -f turtle -s main/.github/workflow_resources/abox_quality_shacl.ttl pmd-core-reasoned.ttl > shacl_report.ttl
- name: Archive shacl_report.ttl
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: shacl_report.ttl
path: |
shacl_report.ttl
- name: Query shacl result
run: |
trap - EXIT
java -jar robot.jar query --input shacl_report.ttl --query main/.github/workflow_resources/q_listValidationResults.sparql ValidationReport.csv
java -jar robot.jar query --input shacl_report.ttl --query main/.github/workflow_resources/q_countValidationResults.sparql ValidationSummary.csv
- name: Archive Validation Reports
uses: actions/upload-artifact@v4
with:
name: validation_reports
path: |
ValidationReport.csv
ValidationSummary.csv