Skip to content

Add CI merge checks (test, uv-lock, pre-commit, weekly dependency update) - #4

Merged
aarora79 merged 3 commits into
mainfrom
add-ci-merge-checks
Jul 23, 2026
Merged

aarora79 merged 3 commits into
mainfrom
add-ci-merge-checks

Conversation

@aarora79

Copy link
Copy Markdown
Owner

Summary

Adds basic PR merge checks so nothing lands on main without 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, then ruff check, mypy on 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 touching pyproject.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-wide py_compile / bash -n / bandit) stays as a fast, complementary safety net.

Formatting cleanup (first commit)

ruff format had never been run on the repo (only ruff 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 sync
  • All four workflow YAMLs and the pre-commit config parse cleanly

Once merged, these run on subsequent PRs; enable branch protection / required status checks on main to make them blocking.

aarora79 added 3 commits July 23, 2026 20:34
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.
@aarora79
aarora79 merged commit 43d7057 into main Jul 23, 2026
7 checks passed
@aarora79
aarora79 deleted the add-ci-merge-checks branch July 23, 2026 21:08
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.

1 participant