File tree Expand file tree Collapse file tree 3 files changed +57
-0
lines changed Expand file tree Collapse file tree 3 files changed +57
-0
lines changed Original file line number Diff line number Diff line change 3030 config : ' .markdownlint.jsonc'
3131 globs : ' **/*.md'
3232
33+ codegen_check :
34+ runs-on : ubuntu-latest
35+ permissions :
36+ contents : read
37+
38+ steps :
39+ - name : Checkout repository
40+ uses : actions/checkout@v4
41+
42+ - name : " Install uv"
43+ uses : astral-sh/setup-uv@v6
44+
45+ - name : " Set up Python 3.10"
46+ uses : actions/setup-python@v5
47+ with :
48+ python-version : " 3.10"
49+
50+ - name : " Install Node.js"
51+ uses : actions/setup-node@v4
52+ with :
53+ node-version : " 20"
54+
55+ - name : " Install dependencies"
56+ run : make sync
57+
58+ - name : " Run codegen"
59+ run : make codegen
60+
61+ - name : " Run lint"
62+ run : make lint
63+
64+ - name : " Check for uncommitted changes"
65+ run : |
66+ if ! git diff --exit-code; then
67+ echo "Error: Modified files detected after running 'make codegen lint'."
68+ echo "Please run 'make codegen lint' locally and commit the changes."
69+ exit 1
70+ fi
71+ if [ -n "$(git ls-files --others --exclude-standard)" ]; then
72+ echo "Error: Untracked files detected after running 'make codegen lint'."
73+ echo "Untracked files:"
74+ git ls-files --others --exclude-standard
75+ echo "Please run 'make codegen lint' locally and commit the changes."
76+ exit 1
77+ fi
78+
3379 static_analysis :
3480 runs-on : ubuntu-latest
3581
66112 test_quick :
67113 needs :
68114 - markdown_lint
115+ - codegen_check
69116 - static_analysis
70117 timeout-minutes : 10
71118 strategy :
Original file line number Diff line number Diff line change @@ -216,6 +216,11 @@ make sync
216216GitHub Actions workflows are in ` .github/workflows/ ` :
217217
218218- ` test.yml ` - Run tests across packages
219+ - ` codegen_check ` job - Ensures ` make codegen lint ` has been run before
220+ commits
221+ - ` static_analysis ` job - Runs linting and type checking per package
222+ - ` test_quick ` and ` test_all ` jobs - Run tests across Python versions and
223+ platforms
219224- ` publish.yml ` - Publish packages to PyPI
220225- ` claude-on-mention.yml ` - Claude Code assistant (can make PRs)
221226- ` claude-on-open-label.yml ` - Claude triage assistant (read-only analysis)
Original file line number Diff line number Diff line change @@ -100,6 +100,11 @@ make precommit
100100
101101This runs linting, type checking, and code generation.
102102
103+ ** Important** : CI will fail if ` make codegen lint ` has not been run before
104+ committing. The ` codegen_check ` job in the test workflow verifies that
105+ running these commands produces no file changes, ensuring all generated
106+ code and formatting is up to date.
107+
103108## Using Makefile in CI
104109
105110The Makefile targets support per-project operations, making them
You can’t perform that action at this time.
0 commit comments