-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (71 loc) · 2.68 KB
/
automated_testing.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
name: OEO CI
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v2
with:
distribution: "adopt"
java-version: "11"
- name: make
run: |
make
- name: validate-profile
run: |
echo "java -jar build/robot.jar validate-profile --input build/oeo-extended/$(cat VERSION)/oeo-extended.omn --profile Full -vvv --output merged-validation.txt"
java -jar build/robot.jar validate-profile --input build/oeo-extended/$(cat VERSION)/oeo-extended.omn --profile Full -vvv --output merged-validation.txt
- name: verify
run: |
java -jar build/robot.jar verify --input build/oeo-extended/$(cat VERSION)/oeo-extended.omn --queries tests/verify/*
- name: find-duplicates
id: duplicates
run: |
linenum=$(sort build/oeo-extended/$(cat VERSION)/oeo-extended.omn | uniq -d | grep -Poc "Class: \K(.*)")
echo "$linenum"
if [ "$linenum" != "0" ]; then
echo "Duplicate values were found"
exit 1
fi
- name: check inferred equivalence
run: |
java -jar build/robot.jar reason --reasoner ELK --input build/oeo-extended/$(cat VERSION)/oeo-extended.omn --axiom-generators "EquivalentClass" --equivalent-classes-allowed asserted-only
- uses: actions/upload-artifact@master
with:
name: build-artifacts
path: build/oeo-extended
test:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v2
with:
distribution: "adopt"
java-version: "11"
- uses: actions/download-artifact@master
with:
name: build-artifacts
path: build/oeo-extended
- name: setup robot 1.9.0
run: |
wget https://github.com/ontodev/robot/releases/download/v1.9.0/robot.jar -O build/robot19.jar
- name: consistency
run: |
wget https://github.com/owlcs/releases/raw/master/HermiT/org.semanticweb.hermit-packaged-1.4.6.519-SNAPSHOT.jar -O build/hermit.jar
OUT=$(java -jar build/hermit.jar file://`pwd`/build/oeo-extended/$(cat VERSION)/oeo-extended.omn -U)
if [ "$(echo "$OUT" | tr -d '[:space:]')" = "Classesequivalentto'owl:Nothing':owl:Nothing" ];
then
exit 0
fi
echo "Ontology is inconsistent: $OUT"
exit 1
- name: Upload Ontology
if: always()
uses: actions/upload-artifact@v3
with:
name: build-files
path: |
build/**/*
!build/**/*.jar