Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .github/workflows/kb-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ on:
- "assets/content_types.yaml"
- "assets/content_types_kb.min.json"
- "assets/models/**"
- "js/src/content-type-label.ts"
- "js/src/content-types-infos.ts"
- "python/scripts/sync.py"
- "python/src/magika/types/content_type_label.py"
- "rust/gen/model"
- "rust/rules/rulesets/**"
- "scripts/sync_kb.py"
Expand All @@ -37,3 +41,16 @@ jobs:

- name: Check content_types_kb.min.json is in sync
run: uv run scripts/sync_kb.py --check

- name: Check Python and JS generated files are in sync
run: |
uv run python/scripts/sync.py python
uv run python/scripts/sync.py js
if ! git diff --exit-code -- \
python/src/magika/types/content_type_label.py \
js/src/content-type-label.ts \
js/src/content-types-infos.ts
then
echo "::error::Python and JS files generated from assets/content_types.yaml are out of sync. Run 'just sync-kb' locally and commit the changes."
exit 1
fi
Loading