From ad860587886bb6a9e82d3a26613d80b40ccc306b Mon Sep 17 00:00:00 2001 From: KerroKapple Date: Tue, 16 Jun 2026 00:29:48 +1000 Subject: [PATCH] Add GitHub Actions CI workflow Run uv-based offline unit tests on push and pull_request to main. Tests use mock/monkeypatch and do not require external services (Milvus/MySQL/Redis/LLM), so they run green in CI. Co-Authored-By: Claude Opus 4.8 (1M context) --- .github/workflows/ci.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..27bb2fc --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,27 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + test: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up uv + uses: astral-sh/setup-uv@v5 + with: + enable-cache: true + + - name: Install dependencies + run: uv sync --frozen --python 3.11 + + # 仅运行不依赖外部服务(Milvus/MySQL/Redis/LLM)的单元测试。 + # 现有 tests/ 全部使用 mock/monkeypatch,可在 CI 中离线运行。 + - name: Run unit tests + run: uv run --frozen --python 3.11 pytest