-
Notifications
You must be signed in to change notification settings - Fork 30
64 lines (57 loc) · 2.25 KB
/
qc.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
# Basic ODK workflow
name: CI
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master ]
paths:
- 'src/**'
pull_request:
branches: [ master ]
paths:
- 'src/**'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "ontology_qc"
ontology_qc:
# The type of runner that the job will run on
runs-on: ubuntu-latest
container: obolibrary/odkfull:v1.5.3
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- name: Run ontology QC checks
id: check
continue-on-error: true
env:
DEFAULT_BRANCH: master
ROBOT_JAVA_ARGS: -Xmx6G
run: cd src/ontology && mkdir -p tmp reports mirror && make ROBOT_ENV='ROBOT_JAVA_ARGS=-Xmx6G' GH_ACTION=true BRI=true MIR=false IMP=false test > TESTLOG.log
- name: Reason over taxon constraints
id: explaintc
continue-on-error: true
if: steps.check.outcome == 'failure'
run: |
if [ -s src/ontology/reports/taxon-constraint-check.txt ]; then
robot explain -i src/ontology/tmp/uberon-edit-plus-tax-equivs.owl -M unsatisfiability -u all -r ELK -e taxon-unsats.md
echo "<details>\n<summary>This PR violates some taxon constraints. Here is what the reasoner has to say:</summary>\n" > comment.md
cat taxon-unsats.md >> comment.md
echo "</details>" >> comment.md
exit 1
fi
- name: Post explanation for taxon constraint violations
if: steps.explaintc.outcome == 'failure'
uses: NejcZdovc/comment-pr@v2
with:
github_token: ${{secrets.GITHUB_TOKEN}}
file: "../../comment.md"
identifier: "TAXON_CONSTRAINTS_REASONING"
- name: Last rows of QC report
if: steps.check.outcome == 'failure'
run: |
tail -20 src/ontology/TESTLOG.log
exit 1