feat: mature repo — TOON-level polish for launch #1
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
| name: Validate Serving Cards | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - 'registry/**/*.yaml' | |
| - 'packages/python/**' | |
| pull_request: | |
| paths: | |
| - 'registry/**/*.yaml' | |
| - 'packages/python/**' | |
| jobs: | |
| validate: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| - name: Install dependencies | |
| run: | | |
| pip install pydantic pyyaml typer | |
| - name: Validate all serving cards | |
| run: | | |
| cd packages/python | |
| failed=0 | |
| for f in ../../registry/**/*.yaml; do | |
| echo "Validating: $f" | |
| if ! python -m servingcard validate "$f"; then | |
| failed=1 | |
| fi | |
| done | |
| if [ "$failed" -eq 1 ]; then | |
| echo "::error::One or more serving cards failed validation" | |
| exit 1 | |
| fi | |
| echo "All serving cards are valid." | |
| lint-yaml: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install yamllint | |
| run: pip install yamllint | |
| - name: Lint YAML files | |
| run: | | |
| yamllint -d "{extends: relaxed, rules: {line-length: {max: 200}}}" registry/ |