Nightly Schema Refresh #112
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: Nightly Schema Refresh | |
| on: | |
| schedule: | |
| - cron: "11 3 * * *" | |
| workflow_dispatch: | |
| jobs: | |
| refresh: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| enable-cache: true | |
| python-version: "3.12" | |
| - name: Sync dependencies | |
| run: uv sync --frozen --extra test --extra playwright --group dev | |
| - name: Ty (type check) | |
| run: uv run ty check proxbox_api/types proxbox_api/utils/retry.py proxbox_api/schemas/sync.py | |
| - name: Install Playwright browser | |
| run: uv run playwright install chromium | |
| - name: Refresh pinned schemas | |
| run: uv run python scripts/refresh_schemas.py | |
| - name: Show schema drift summary | |
| run: git diff --stat -- proxbox_api/generated | |
| - name: Run schema contract tests | |
| run: uv run pytest -q tests/test_schema_contracts.py tests/test_vm_sync.py | |
| - name: Upload generated artifacts | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: refreshed-schema-artifacts | |
| path: | | |
| proxbox_api/generated/proxmox/openapi.json | |
| proxbox_api/generated/proxmox/pydantic_models.py | |
| proxbox_api/generated/netbox/openapi.json |