Skip to content

Add CI that tests only changed packages and their dependents - #2

Merged
sovikroy merged 1 commit into
mainfrom
claude/project-thread-3kou47
Nov 4, 2026
Merged

sovikroy merged 1 commit into
mainfrom
claude/project-thread-3kou47

Conversation

@sovikroy

@sovikroy sovikroy commented Nov 4, 2026 •

Copy link
Copy Markdown
Owner

Requested by Sovik · project thread

Builds on the workspace scaffold from #1 (now merged).

What it does

.github/workflows/ci.yml, on pull requests, pushes to main and manual dispatch:

  • Detect affected packages: scripts/ci/affected.py (stdlib only) reads [tool.uv.workspace] members and each member's dependencies, diffs against the PR base (or the previous main commit on push), and selects changed members plus everything that depends on them transitively. Shared files outside a member (root pyproject.toml, uv.lock, workflow) select every member; Markdown, docs/ and LICENSE select none.
  • Lint and type check: ruff check, ruff format --check, mypy (strict) over the whole repo.
  • Test: one pytest matrix job per affected member. "No tests collected" isn't treated as a failure.
  • CI OK: one summary job to mark as required in branch protection, green when tests are skipped because nothing relevant changed.
  • uv caching via astral-sh/setup-uv keyed on uv.lock, and UV_LOCKED=1 so a stale lockfile fails the build.

Also adds scripts to mypy's files and a CI section to the README.

Checked

  • First workflow run on this PR is green: lint/type check, Test core, Test cli and CI OK (all members ran because this PR touches the root pyproject.toml).
  • Locally: ruff, ruff format, mypy and pytest pass; actionlint is clean.
  • affected.py: change in packages/core selects core and cli; change in apps/cli selects only cli; uv.lock selects all; README-only selects none.

🤖 Generated with Claude Code

https://claude.ai/code/session_01SE2PhJELRyWZhRxAGNXECc

Lint (ruff), type check (mypy) across the repo, and run pytest per
workspace member for members affected by the change, computed from the
uv workspace dependency graph by scripts/ci/affected.py. Uses setup-uv
caching keyed on uv.lock and a single CI OK job for branch protection.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SE2PhJELRyWZhRxAGNXECc
@sovikroy sovikroy self-assigned this Nov 4, 2026
@sovikroy
sovikroy changed the base branch from claude/project-thread-5syfbw to main November 4, 2026 17:55
@sovikroy
sovikroy merged commit a5c67c7 into main Nov 4, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants