-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (36 loc) · 1.2 KB
/
schema_validator.yaml
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
name: YAML schema validator
on:
# Triggers the workflow on pull request events but only for the main branch
pull_request:
branches: [ main ]
paths:
- 'cl_kb_pipeline/config/dumps/neo4j2owl-config.yaml'
jobs:
yaml-schema-validation:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v3
with:
python-version: 3.8
- name: Install dependencies
run: pip install -r ruamel.yaml==0.17.21 jsonschema==4.4.0
- name: Schema validation
id: schema
run: |
python src/test_neo2owl_config.py
- name: Prepare schema validator comment
if: failure()
run: |
echo "cl_kb_pipeline/config/dumps/neo4j2owl-config.yaml file failed the schema validation check " > comment.md; cat validation.report >> comment.md
- name: Prepare success comment
run: |
echo "cl_kb_pipeline/config/dumps/neo4j2owl-config.yaml file passed validation check " > comment.md
- name: Post comment validator comment
if: always()
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
uses: NejcZdovc/[email protected]
with:
file: "../../comment.md"