-
Notifications
You must be signed in to change notification settings - Fork 141
188 lines (176 loc) · 7.76 KB
/
tools.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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Tools
on:
push:
branches: [ master ]
paths:
- 'tools/**'
pull_request:
branches: [ master ]
paths:
- 'tools/**'
jobs:
build:
runs-on: ${{ matrix.os }}
timeout-minutes: 60
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v2
- uses: dorny/paths-filter@v2
id: changes
with:
filters: |
abel:
- 'tools/abel/**'
explorer:
- 'tools/explorer/**'
instance_guid_generator:
- 'tools/guid_generator/instance/**'
ontology_guid_generator:
- 'tools/guid_generator/ontology/**'
instance_validator:
- 'tools/validators/instance_validator/**'
rdf_generator:
- 'tools/rdf_generator/**'
type_validator:
- 'tools/validators/ontology_validator/**'
scoring:
- 'tools/scoring/**'
- name: Set up Python 3.11
uses: actions/setup-python@v1
with:
python-version: '3.11'
- name: Install Pylint
run: |
python -m pip install pylint
#---------- Ontology Yaml Type Validator ----------#
- name: Ontology Yaml Type Validator Install dependencies
run: |
python setup.py install
working-directory: ./tools/validators/ontology_validator
- name: Run pylint on Ontology Type Validator
if: steps.changes.outputs.type_validator == 'true'
run: |
pylint --rcfile ./styles/pylintrc ./tools/validators/ontology_validator
- name: Ontology Yaml Validator Generator Tests
if: steps.changes.outputs.type_validator == 'true'
run: |
python -m unittest discover -p '*_test.py' --failfast -v
working-directory: ./tools/validators/ontology_validator
#---------- Ontology Yaml Instance Validator ----------#
- name: Instance Yaml Validator Install dependencies
run: |
python -m pip install .
working-directory: ./tools/validators/instance_validator
- name: Run pylint on Ontology Instance Validator
if: steps.changes.outputs.instance_validator == 'true'
run: |
pylint --rcfile ./styles/pylintrc ./tools/validators/instance_validator
- name: Instance Yaml Validator Unit Tests
if: steps.changes.outputs.instance_validator == 'true' || steps.changes.outputs.type_validator == 'true'
run: |
python -m unittest discover -p '*_test.py' --failfast -v
working-directory: ./tools/validators/instance_validator
- name: Instance Yaml Validator Integraion Test
if: steps.changes.outputs.instance_validator == 'true' || steps.changes.outputs.type_validator == 'true'
run: |
python instance_validator.py -i ../../abel/tests/test_resources/good_test_building_config.yaml
working-directory: ./tools/validators/instance_validator
- name: Correct Ontology Descriptions
run: |
pip install -r tools/spellcheck/requirements.txt
python tools/spellcheck/spellcheck.py
#---------- ABEL ----------#
- name: ABEL install dependencies
if: steps.changes.outputs.abel == 'true' || steps.changes.outputs.instance_validator == 'true' || steps.changes.outputs.type_validator == 'true'
run: |
python setup.py install
working-directory: ./tools/abel
- name: Run pylint on ABEL
if: steps.changes.outputs.abel == 'true'
run: |
pylint --rcfile ./styles/pylintrc ./tools/abel
- name: ABEL Unit Tests
if: steps.changes.outputs.abel == 'true' || steps.changes.outputs.instance_validator == 'true' || steps.changes.outputs.type_validator == 'true'
run: |
python -m unittest discover -p '*_test.py' --failfast -v
working-directory: ./tools/abel
#---------- Instance GUID Generator ----------#
- name: Instance GUID Generator Install dependencies
if: steps.changes.outputs.instance_guid_generator == 'true' || steps.changes.outputs.instance_validator == 'true'
run: |
python setup.py install
working-directory: ./tools/guid_generator/instance
- name: Run pylint on Instance GUID Generator
if: steps.changes.outputs.instance_guid_generator == 'true'
run: |
pylint --rcfile ./styles/pylintrc ./tools/guid_generator/instance
- name: Instance GUID Generator Tests
if: steps.changes.outputs.instance_guid_generator == 'true' || steps.changes.outputs.instance_validator == 'true'
run: |
python -m unittest discover -p '*_test.py' --failfast -v
working-directory: ./tools/guid_generator/instance
#---------- Ontology GUID Generator ----------#
- name: Ontology GUID Generator Install dependencies
if: steps.changes.outputs.ontology_guid_generator == 'true' || steps.changes.outputs.type_validator == 'true'
run: |
python setup.py install
working-directory: ./tools/guid_generator/ontology
- name: Run pylint on Ontology GUID Generator
if: steps.changes.outputs.ontology_guid_generator == 'true'
run: |
pylint --rcfile ./styles/pylintrc ./tools/guid_generator/ontology
- name: Ontology GUID Generator Tests
if: steps.changes.outputs.ontology_guid_generator == 'true' || steps.changes.outputs.type_validator == 'true'
run: |
python -m unittest discover -p '*_test.py' --failfast -v
working-directory: ./tools/guid_generator/ontology
#---------- RDF Generator ----------#
- name: RDF Generator Install dependencies
if: steps.changes.outputs.rdf_generator == 'true'
run: |
python -m pip install --upgrade pip
python setup.py install
working-directory: ./tools/rdf_generator
- name: Run pylint on RDF Generator
if: steps.changes.outputs.rdf_generator == 'true'
run: |
pylint --rcfile ./styles/pylintrc ./tools/rdf_generator
- name: RDF Generator Tests
if: steps.changes.outputs.rdf_generator == 'true'
run: |
python -m unittest discover -p '*_test.py' --failfast -v
working-directory: ./tools/rdf_generator/rdfformat/tests
#---------- Ontology Explorer ----------#
- name: Ontology Explorer Install dependencies
if: steps.changes.outputs.explorer == 'true' || steps.changes.outputs.type_validator == 'true' || steps.changes.outputs.instance_validator == 'true'
run: |
python setup.py install
working-directory: ./tools/explorer
- name: Run pylint on Ontology Explorer
if: steps.changes.outputs.explorer == 'true'
run: |
pylint --rcfile ./styles/pylintrc ./tools/explorer
- name: Ontology Explorer Tests
if: steps.changes.outputs.explorer == 'true' || steps.changes.outputs.type_validator == 'true' || steps.changes.outputs.instance_validator == 'true'
run: |
python -m unittest discover -p '*_test.py' --failfast -v
working-directory: ./tools/explorer
#---------- Configuration scoring ----------#
- name: Configuration scoring Install dependencies
if: steps.changes.outputs.scoring == 'true' || steps.changes.outputs.instance_validator == 'true'
run: |
python setup.py install
working-directory: ./tools/scoring
- name: Run pylint on Configuration Scorer
if: steps.changes.outputs.scoring == 'true'
run: |
pylint --rcfile ./styles/pylintrc ./tools/scoring
- name: Configuration Scorer Tests
if: steps.changes.outputs.scoring == 'true' || steps.changes.outputs.instance_validator == 'true'
run: |
python -m unittest discover -p '*_test.py' --failfast -v
working-directory: ./tools/scoring