Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,52 @@ jobs:
config: '.markdownlint.jsonc'
globs: '**/*.md'

codegen_check:
runs-on: ubuntu-latest
permissions:
contents: read

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: "Install uv"
uses: astral-sh/setup-uv@v6

- name: "Set up Python 3.10"
uses: actions/setup-python@v5
with:
python-version: "3.10"

- name: "Install Node.js"
uses: actions/setup-node@v4
with:
node-version: "20"

- name: "Install dependencies"
run: make sync

- name: "Run codegen"
run: make codegen

- name: "Run lint"
run: make lint

- name: "Check for uncommitted changes"
run: |
if ! git diff --exit-code; then
echo "Error: Modified files detected after running 'make codegen lint'."
echo "Please run 'make codegen lint' locally and commit the changes."
exit 1
fi
if [ -n "$(git ls-files --others --exclude-standard)" ]; then
echo "Error: Untracked files detected after running 'make codegen lint'."
echo "Untracked files:"
git ls-files --others --exclude-standard
echo "Please run 'make codegen lint' locally and commit the changes."
exit 1
fi

static_analysis:
runs-on: ubuntu-latest

Expand Down Expand Up @@ -66,6 +112,7 @@ jobs:
test_quick:
needs:
- markdown_lint
- codegen_check
- static_analysis
timeout-minutes: 10
strategy:
Expand Down
5 changes: 5 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,11 @@ make sync
GitHub Actions workflows are in `.github/workflows/`:

- `test.yml` - Run tests across packages
- `codegen_check` job - Ensures `make codegen lint` has been run before
commits
- `static_analysis` job - Runs linting and type checking per package
- `test_quick` and `test_all` jobs - Run tests across Python versions and
platforms
- `publish.yml` - Publish packages to PyPI
- `claude-on-mention.yml` - Claude Code assistant (can make PRs)
- `claude-on-open-label.yml` - Claude triage assistant (read-only analysis)
Expand Down
5 changes: 5 additions & 0 deletions DEVELOPING.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,11 @@ make precommit

This runs linting, type checking, and code generation.

**Important**: CI will fail if `make codegen lint` has not been run before
committing. The `codegen_check` job in the test workflow verifies that
running these commands produces no file changes, ensuring all generated
code and formatting is up to date.

## Using Makefile in CI

The Makefile targets support per-project operations, making them
Expand Down