diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..bad7e6a --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,38 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + +permissions: + contents: read + +concurrency: + group: ci-${{ github.ref }} + cancel-in-progress: true + +jobs: + test: + name: tests (py${{ matrix.python-version }}) + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: ["3.11", "3.12"] + steps: + - uses: actions/checkout@v4 + + - name: Install uv + uses: astral-sh/setup-uv@v5 + with: + enable-cache: true + python-version: ${{ matrix.python-version }} + + - name: Sync dependencies + run: uv sync --extra gateway --extra mcp --extra tui --extra test + + - name: Run deterministic test suite + # Integration/e2e suites need real provider credentials; they are excluded + # from CI. Everything else runs with scripted transports and no API calls. + run: uv run pytest -q --ignore=tests/integration --ignore=tests/e2e diff --git a/README.md b/README.md index 2a913e8..df97756 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ **English** | [中文](README.zh.md) +[![CI](https://github.com/Niraya666/OkComputer/actions/workflows/ci.yml/badge.svg)](https://github.com/Niraya666/OkComputer/actions/workflows/ci.yml) [![License: Apache 2.0](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](LICENSE) OkComputer is a small, model-agnostic agent harness in Python. A model uses it to work over files, tools, context, and sub-tasks across long-running tasks. diff --git a/README.zh.md b/README.zh.md index 3adba8c..2399895 100644 --- a/README.zh.md +++ b/README.zh.md @@ -2,6 +2,7 @@ [English](README.md) | **中文** +[![CI](https://github.com/Niraya666/OkComputer/actions/workflows/ci.yml/badge.svg)](https://github.com/Niraya666/OkComputer/actions/workflows/ci.yml) [![License: Apache 2.0](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](LICENSE) OkComputer 是一个用 Python 写的、体量很小、模型无关的 agent harness。模型通过它围绕文件、工具、上下文和子任务完成长时间运行的任务。