Skip to content

Commit 36edf83

Browse files
committed
test(python): add typecheck of generated types
1 parent 71d2598 commit 36edf83

File tree

3 files changed

+38
-3
lines changed

3 files changed

+38
-3
lines changed

.github/workflows/primary.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929

3030
- run: pnpm install --frozen-lockfile
3131

32-
# Typecheck first (before format/lint possibly change line numbers)
32+
# Typecheck generation code in scripts/ (before format/lint possibly change line numbers)
3333
- run: pnpm typecheck
3434

3535
# On push: auto-fix formatting and linting (will be committed)
@@ -44,7 +44,12 @@ jobs:
4444
- run: pnpm lint
4545
if: github.event_name == 'pull_request'
4646

47-
- run: pnpm codegen all
47+
- name: Generate types
48+
run: pnpm codegen all
49+
50+
# Typecheck generated code (Python via ty, TypeScript via tsc)
51+
- run: uv run ty check src/
52+
working-directory: packages/oxa-types-py
4853
- run: pnpm test
4954

5055
- name: Commit changes

packages/oxa-types-py/pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,5 @@ packages = ["src/oxa_types"]
3535
[tool.uv]
3636
dev-dependencies = [
3737
"ruff>=0.14",
38+
"ty>=0.0.1a13",
3839
]

packages/oxa-types-py/uv.lock

Lines changed: 30 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)