Files
Gökay Aydoğan 647a38f265 Fix schema controls and prevent registry regressions across all models (#85)
* fix: preserve and validate model controls across the fal catalog

* fix: preserve enum constraints through nested normalization
2026-09-17 19:11:50 +03:00

75 lines
2.2 KiB
YAML

name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
sidebar-test:
name: Frontend regression tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v4
with:
node-version: "22"
- run: node --experimental-vm-modules --test tests/test_*.mjs
lint:
name: Lint (ruff)
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v7
- name: Set up Python
uses: actions/setup-python@v7
with:
python-version: "3.11"
- name: Install ruff
run: pip install ruff
- name: Run ruff
run: ruff check .
test:
name: Test (python ${{ matrix.python-version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.12"]
steps:
- name: Check out code
uses: actions/checkout@v7
- name: Set up Python
uses: actions/setup-python@v7
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install -r requirements.txt
pip install pytest
- name: Run tests
run: |
if [ -d tests ]; then python -m pytest tests -x -q; else echo "no tests yet"; fi
- name: Registry builder smoke check
run: |
if [ -f scripts/build_registry.py ]; then python scripts/build_registry.py --help; else echo "no registry builder yet"; fi
- name: Validate model registry
run: |
python -c "
import json, pathlib
path = pathlib.Path('data/fal_registry.json')
if not path.exists():
print('no registry file yet')
else:
registry = json.loads(path.read_text())
assert {'version', 'models', 'model_count'} <= set(registry), 'missing required keys'
assert registry['model_count'] == len(registry['models']), 'model_count mismatch'
assert registry['model_count'] > 500, 'suspiciously few models'
print(f\"registry OK: {registry['model_count']} models\")
"