Skip to content

Merge pull request #26 from need-singularity/feat/cli-v3 #982

Merge pull request #26 from need-singularity/feat/cli-v3

Merge pull request #26 from need-singularity/feat/cli-v3 #982

Workflow file for this run

# ============================================================================
# CI โ€” Anima hexa-native ํŒŒ์ดํ”„๋ผ์ธ
# ============================================================================
#
# 2026-04-12: anima/src/ ํ๊ธฐ โ†’ Python packaging/verify-syntax/python-tests/
# bench-verify/rust-tests ๋ชจ๋‘ ์ œ๊ฑฐ. ํ˜„์žฌ CI๋Š” CDO JSON ๊ฒ€์ฆ๋งŒ ์ˆ˜ํ–‰.
# ํ•™์Šต/์ถ”๋ก ์€ hexa-native (PYTHONPATH ๋ถˆํ•„์š”).
# ============================================================================
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
cdo-validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: CDO validate JSON files
run: |
python3 -c "
import json, os, sys
SKIP_DIRS = {'.git', 'target', '__pycache__', 'node_modules', 'venv', '.venv', '.claude'}
ok = warn = fail = 0
for root, dirs, files in os.walk('.'):
dirs[:] = [d for d in dirs if d not in SKIP_DIRS]
for f in files:
if not f.endswith('.json'):
continue
path = os.path.join(root, f)
try:
with open(path) as fh:
data = json.load(fh)
except (json.JSONDecodeError, UnicodeDecodeError) as e:
print(f'FAIL {path}: {e}')
fail += 1
continue
if not isinstance(data, dict):
ok += 1
continue
if '_meta' in data:
ok += 1
else:
print(f'WARN {path}: missing _meta field')
warn += 1
print(f'\nCDO validation: {ok} ok, {warn} warn, {fail} fail')
if fail:
print('Broken JSON detected โ€” failing CI.')
sys.exit(1)
"