Merge pull request #26 from need-singularity/feat/cli-v3 #982
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # ============================================================================ | |
| # 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) | |
| " |