Skip to content

Commit

Permalink
workflows.check-json - add test to ensure all custom signatures' PUID…
Browse files Browse the repository at this point in the history
…s are found in fileformats.yml
  • Loading branch information
MatteoCampinoti94 committed Oct 22, 2024
1 parent c327f4e commit 80529aa
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/check-json.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install dependencies
run: python -m pip install check-jsonschema
run: python -m pip install check-jsonschema pyyaml
- name: Check JSON Syntax
uses: limitusus/json-syntax-check@v2
with:
Expand All @@ -35,7 +35,7 @@ jobs:
line-length: disable
- name: Check JSON Schemata
run: check-jsonschema --verbose --check-metaschema *.schema.json
- name: Check Files
- name: Check Files Schemata
run: |
status=0;
for schema in *.schema.json; do
Expand All @@ -45,4 +45,7 @@ jobs:
fi;
done;
done;
exit $status
exit $status
- name: Check Custom Signatures
run: |
python -c "import yaml; cs = yaml.load(open('custom_signatures.yml'), yaml.Loader); fs = yaml.load(open('fileformats.yml'), yaml.Loader); assert all(c['puid'] in fs for c in cs), 'Some custom signatures PUIDs are not present in file formats file.'"

0 comments on commit 80529aa

Please sign in to comment.