Skip to content

Commit 3e575c8

Browse files
committed
ci: add GitHub Actions workflow and make ci target
1 parent 58441f7 commit 3e575c8

4 files changed

Lines changed: 39 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
quality:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- uses: actions/setup-python@v5
19+
with:
20+
python-version: '3.11'
21+
cache: pip
22+
23+
- name: Install dependencies
24+
run: pip install -e ".[dev]"
25+
26+
- name: CI
27+
run: make ci

Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.PHONY: help format lint check fix type-check test clean pre-commit-install pre-commit-run
1+
.PHONY: help format lint check fix type-check test ci clean pre-commit-install pre-commit-run
22

33
help: ## Show this help message
44
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
@@ -49,4 +49,6 @@ clean: ## Remove build artifacts and caches
4949

5050
# ==================== All-in-one ====================
5151

52+
ci: check type-check test ## CI pipeline (check only, no file modification)
53+
5254
all: fix format type-check test ## Fix, format, type-check, and test

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,10 +369,16 @@ make type-check
369369
# Run tests
370370
make test
371371

372-
# Run all checks
372+
# Run all checks (local: auto-fix + test)
373373
make all
374+
375+
# CI-equivalent checks (no auto-fix; same as GitHub Actions)
376+
make ci
374377
```
375378

379+
Before opening a pull request, run `make ci`. GitHub Actions runs the same
380+
lint, format, type-check, and test checks on pull requests to `main`.
381+
376382
The test suite lives under `tests/` and covers backend contracts, routing
377383
strategies, service discovery, health checks, and PD executors.
378384

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ dependencies = [
1919
"shortuuid>=1.0.0",
2020
"fire>=0.5.0",
2121
"pyyaml>=6.0",
22+
"msgpack>=1.0.0",
23+
"pyzmq>=25.0.0",
2224
]
2325

2426
[project.optional-dependencies]

0 commit comments

Comments
 (0)