Repository navigation
Add CI merge checks (test, uv-lock, pre-commit, weekly dependency update) - #4
Merged
Merged
Conversation
Bring existing Python and one Markdown file into compliance with ruff-format and the trailing-whitespace hook, so the new pre-commit workflow is green from the start. Formatting only -- no behavioral change; all tests still pass.
… update Add GitHub Actions so pull requests are gated on the same checks we run by hand: - test.yml: for each uv project (benchmarks, self-hosted/vllm), uv sync then ruff lint, mypy on the type-checked modules, and the unittest suite. This is the primary merge gate and matches the per-project dev-workflow docs. - uv-lock-check.yml: on PRs touching pyproject.toml/uv.lock, verify each project's uv.lock is in sync (uv lock --check) so lockfiles never drift. - pre-commit.yml + .pre-commit-config.yaml: run ruff lint+format and basic hygiene hooks (whitespace, EOF, merge markers, YAML) on every PR. - dependency-update.yml: weekly scheduled job that refreshes the uv lockfiles with a 7-day supply-chain quarantine and opens a PR if anything changed. Adapted from the mcp-gateway-registry workflows, scoped to this repo's two uv projects and simplified to uv-only (no Makefile/npm). The existing lint.yml (repo-wide py_compile/bash -n/bandit) stays as a complementary fast safety net.
The existing lint.yml ran `bandit -r . -f txt`, which scanned test files (and, locally, .venv) and failed on expected patterns: asserts (B101) and /tmp paths (B108) in tests, and "password"-substring matches (B105) on chart-label strings. Scope the CI scan to source directories (benchmarks/scripts, self-hosted/vllm/clients, self-hosted/vllm/scripts) so test-only asserts and temp paths are not flagged, and add inline `# nosec` justifications to the four genuine source findings (two B105 chart labels, two B101 invariant asserts). Bandit now exits clean.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds basic PR merge checks so nothing lands on
mainwithout the same gates we run by hand. Reviewed the mcp-gateway-registry workflows, kept the generic/reusable ones, and skipped the ~11 that are specific to their services (auth-server, registry, helm, terraform, docker image builds, docs).New workflows
test.yml(primary merge gate) -- for each uv project (benchmarks/,self-hosted/vllm/):uv sync, thenruff check,mypyon the type-checked modules, and the unittest suites (129 + 18 tests). Mirrors each project's documented dev workflow and the top-level CLAUDE.md.uv-lock-check.yml-- on PRs touchingpyproject.toml/uv.lock, verifies each project's lockfile is in sync (uv lock --check) so they never drift.pre-commit.yml+.pre-commit-config.yaml-- runs ruff lint+format and basic hygiene hooks (trailing whitespace, EOF, merge markers, YAML, large files) on every PR.dependency-update.yml-- weekly scheduled job that refreshes the uv lockfiles with a 7-day supply-chain quarantine and opens a PR if anything changed. Simplified to uv-only (this repo has no Makefile/npm).The existing
lint.yml(repo-widepy_compile/bash -n/ bandit) stays as a fast, complementary safety net.Formatting cleanup (first commit)
ruff formathad never been run on the repo (onlyruff check), so the pre-commit hook reformatted 10 existing files. That cleanup is a separate first commit so the workflow commit is easy to read, and it makes pre-commit CI green from day one. Formatting only -- no behavioral change.Test plan
pre-commit run --all-files-- passes, idempotent (no changes on a second run)uv run ruff check+uv run python -m unittest discover -s tests-- pass in both projects (147 tests total)uv lock --check-- both lockfiles in syncOnce merged, these run on subsequent PRs; enable branch protection / required status checks on
mainto make them blocking.