Feat 226539: use mocked graphical data #49
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "⛓️Test rml-mappings⛓️" | |
on: | |
workflow_dispatch: | |
merge_group: | |
pull_request: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
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 |