-
Notifications
You must be signed in to change notification settings - Fork 0
79 lines (69 loc) · 2.75 KB
/
rdf_tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: "⛓️Test rml-mappings⛓️"
on:
workflow_dispatch:
merge_group:
pull_request:
jobs:
build:
runs-on: ubuntu-22.04
defaults:
run:
shell: bash
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up JDK 19
uses: actions/setup-java@v4
with:
java-version: "19"
distribution: "temurin"
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: install apache jena
run: |
wget https://dlcdn.apache.org/jena/binaries/apache-jena-5.3.0.tar.gz
tar -xzvf apache-jena-*.tar.gz
- name: Check ontologies and mappings are valid rdf
id: validate_ontology_rdf
run: |
export JENA_HOME=$(pwd)/apache-jena-5.3.0/
export PATH="$PATH:$JENA_HOME/bin"
riot --validate owl/*ttl
riot --validate rml_mappings/imf/*
riot --validate rml_mappings/graphics/*
- name: Test imf mappings
run: |
export JENA_HOME=$(pwd)/apache-jena-5.3.0/
export PATH="$PATH:$JENA_HOME/bin"
curl -o rml_mappings/pandid.xml https://raw.githubusercontent.com/equinor/NOAKADEXPI/refs/heads/main/Blueprint/DISC_EXAMPLE-02/DISC_EXAMPLE-02-02.xml
docker run -v .:/data rmlio/rmlmapper-java:7.2.0 -m rml_mappings/imf/* -o /data/imf.ttl -s Turtle
SHACL_RESULT=$(shacl v --shapes shacl/imf-dexpi.shacl.ttl --data imf.ttl --text --quiet)
if [ "$SHACL_RESULT" != "Conforms" ]; then
echo "SHACL validation failed"
echo $SHACL_RESULT
exit 1
else
echo "SHACL validation passed"
fi
- name: Test graphics mappings
run: |
export JENA_HOME=$(pwd)/apache-jena-5.3.0/
export PATH="$PATH:$JENA_HOME/bin"
curl -o rml_mappings/pandid.xml https://raw.githubusercontent.com/equinor/NOAKADEXPI/refs/heads/main/Blueprint/DISC_EXAMPLE-02/DISC_EXAMPLE-02-02.xml
docker run -v .:/data rmlio/rmlmapper-java:7.2.0 -m rml_mappings/graphics/* -o /data/graphics.ttl -s Turtle
SHACL_RESULT=$(shacl v --shapes shacl/graphic-dexpi.shacl.ttl --data graphics.ttl --text --quiet)
if [ "$SHACL_RESULT" != "Conforms" ]; then
echo "SHACL validation failed"
echo $SHACL_RESULT
exit 1
else
echo "SHACL validation passed"
fi
- name: Test rdf examples
run: |
export JENA_HOME=$(pwd)/apache-jena-5.3.0/
export PATH="$PATH:$JENA_HOME/bin"
riot --validate examples/graphical.trig
shacl v --shapes shacl/graphic-dexpi.shacl.ttl --data examples/graphical.trig