-
Notifications
You must be signed in to change notification settings - Fork 13
39 lines (32 loc) · 1.06 KB
/
json_validation.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
name: JSON Validation
on:
push:
paths:
- '**/definition.json'
- '**/question_catalog_schema.json'
- '**/osm_condition_schema.json'
- '**/expression_schema.json'
pull_request:
paths:
- '**/definition.json'
- '**/question_catalog_schema.json'
- '**/osm_condition_schema.json'
- '**/expression_schema.json'
# Allow running this workflow manually from the Actions tab
workflow_dispatch:
jobs:
validate:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup python
uses: actions/setup-python@v4
with:
python-version: '3.12'
- name: Install jsonschema validator
run: pip install jsonschema
- name: Validate questions JSON
run: jsonschema --instance 'assets/question_catalog/definition.json' 'schemas/question_catalog_schema.json'
- name: Validate advanced questions JSON
run: jsonschema --instance 'assets/advanced_question_catalog/definition.json' 'schemas/question_catalog_schema.json'