-
Notifications
You must be signed in to change notification settings - Fork 4
117 lines (113 loc) · 4.24 KB
/
diff.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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
name: 'Create ROBOT diffs on Pull requests'
on:
# Triggers the workflow on pull request events for the master branch
pull_request:
branches: [ master ]
# 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:
edit_file:
runs-on: ubuntu-latest
container: obolibrary/odklite:v1.3.0
steps:
- uses: actions/checkout@v2
# Checks-out main branch under "main" directory
- uses: actions/checkout@v2
with:
ref: master
path: master
- name: Diff classification
run: export ROBOT_JAVA_ARGS=-Xmx6G; robot diff --labels True --left master/src/ontology/aeon-edit.owl --left-catalog master/src/ontology/catalog-v001.xml --right src/ontology/aeon-edit.owl --right-catalog src/ontology/catalog-v001.xml -f markdown -o edit-diff.md
- name: Upload diff
uses: actions/upload-artifact@v2
with:
name: edit-diff.md
path: edit-diff.md
classify_branch:
runs-on: ubuntu-latest
container: obolibrary/odklite:v1.3.0
steps:
- uses: actions/checkout@v2
- name: Classify ontology
run: cd src/ontology; make IMP=FALSE PAT=FALSE MIR=FALSE aeon.owl
- name: Upload PR aeon.owl
uses: actions/upload-artifact@v2
with:
name: aeon-pr.owl
path: src/ontology/aeon.owl
retention-days: 1
classify_main:
runs-on: ubuntu-latest
container: obolibrary/odklite:v1.3.0
steps:
- uses: actions/checkout@v2
with:
ref: master
- name: Classify ontology
run: cd src/ontology; make IMP=FALSE PAT=FALSE MIR=FALSE aeon.owl
- name: Upload master aeon.owl
uses: actions/upload-artifact@v2
with:
name: aeon-master.owl
path: src/ontology/aeon.owl
retention-days: 1
diff_classification:
needs:
- classify_branch
- classify_main
runs-on: ubuntu-latest
container: obolibrary/odklite:v1.3.0
steps:
- uses: actions/checkout@v2
- name: Download master classification
uses: actions/[email protected]
with:
name: aeon-master.owl
path: src/ontology/aeon-master.owl
- name: Download PR classification
uses: actions/[email protected]
with:
name: aeon-pr.owl
path: src/ontology/aeon-pr.owl
- name: Diff classification
run: export ROBOT_JAVA_ARGS=-Xmx6G; cd src/ontology; robot diff --labels True --left aeon-master.owl/aeon.owl --left-catalog catalog-v001.xml --right aeon-pr.owl/aeon.owl --right-catalog catalog-v001.xml -f markdown -o classification-diff.md
- name: Upload diff
uses: actions/upload-artifact@v2
with:
name: classification-diff.md
path: src/ontology/classification-diff.md
post_comment:
needs: [diff_classification, edit_file]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Download reasoned diff
uses: actions/[email protected]
with:
name: classification-diff.md
path: classification-diff.md
- name: Prepare reasoned comment
run: "echo \"<details>\n <summary> Here's a diff of how these changes impact the classified ontology: </summary> \n\" >comment.md; cat classification-diff.md/classification-diff.md >>comment.md"
- name: Post reasoned comment
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: NejcZdovc/[email protected]
with:
file: "../../comment.md"
identifier: "REASONED"
- uses: actions/checkout@v2
- name: Download edit diff
uses: actions/[email protected]
with:
name: edit-diff.md
path: edit-diff.md
- name: Prepare edit file comment
run: "echo \"<details>\n <summary> Here's a diff of your edit file (unreasoned) </summary> \n\" >edit-comment.md; cat edit-diff.md/edit-diff.md >>edit-comment.md"
- name: Post comment
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: NejcZdovc/[email protected]
with:
file: "../../edit-comment.md"
identifier: "UNREASONED"