Skip to content

Commit fed06a3

Browse files
committed
ci: Add nightly OpenAPI spec sync and make model codegen reproducible
1 parent ac95e35 commit fed06a3

11 files changed

Lines changed: 29393 additions & 283 deletions

.gitattributes

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Vendored snapshot of the published API specification. Marked as generated so it collapses by default in diffs
2+
# (the generated models are what reviewers read - the snapshot is there for provenance and reproducibility, and
3+
# stays one click away) and so it doesn't skew the repository language statistics.
4+
spec/openapi.json linguist-generated=true

.github/workflows/_checks.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,32 @@ jobs:
7373
- name: Async docstrings check
7474
run: uv run poe check-docstrings
7575

76+
# Regenerates the models from the committed `spec/openapi.json` and fails when the result differs from what is
77+
# committed. Keeps the generated files a pure function of the snapshot plus the pinned codegen tooling, so a
78+
# codegen or formatter upgrade can't silently drift them, and nobody can hand-edit them.
79+
models_check:
80+
name: Models check
81+
runs-on: ubuntu-latest
82+
steps:
83+
- name: Checkout repository
84+
uses: actions/checkout@v7
85+
86+
- name: Set up Python
87+
uses: actions/setup-python@v7
88+
with:
89+
python-version: ${{ env.PYTHON_VERSION }}
90+
91+
- name: Set up uv package manager
92+
uses: astral-sh/setup-uv@v8.3.2
93+
with:
94+
python-version: ${{ env.PYTHON_VERSION }}
95+
96+
- name: Install dependencies
97+
run: uv run poe install-dev
98+
99+
- name: Generated models check
100+
run: uv run poe check-models
101+
76102
markdown_lint_check:
77103
name: Markdown lint check
78104
runs-on: ubuntu-latest

.github/workflows/manual_regenerate_models.yaml

Lines changed: 0 additions & 257 deletions
This file was deleted.

0 commit comments

Comments
 (0)