-
Notifications
You must be signed in to change notification settings - Fork 1
49 lines (44 loc) · 1.44 KB
/
medata-ci-workflows.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
name: Metadata CI Workflow
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
validate-json:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: validate-json-files
id: json-validate
uses: GrantBirki/json-yaml-validate@v3
with:
comment: "true"
- name: Validate campaign JSON
uses: cardinalby/schema-validator-action@v3
with:
schema: ukaea-schema/facility/hive/campaign.schema.json
file: ./ukaea-schema/examples/hive/campaign.json
- name: Validate experiment JSON
uses: cardinalby/schema-validator-action@v3
with:
schema: ./ukaea-schema/facility/hive/campaign.schema.json
file: ./ukaea-schema/examples/hive/campaign.json
# - name: Validate facility JSON
# uses: cardinalby/schema-validator-action@v3
# with:
# schema: ./ukaea-schema/facility/facility.schema.json
# file: ./ukaea-schema/examples/facility.json
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: custom-camel-case-validation
run: |
readarray -d '' json_file_paths < <(find . -name *.json -print0)
echo ${json_file_paths[@]}
for json_file in ${json_file_paths[@]}; do
python validate_camel_case.py $json_file
done