feat: 启动面支持本机已装编码工具 #63
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
| name: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| permissions: | |
| contents: read | |
| jobs: | |
| test: | |
| name: Python ${{ matrix.python-version }} | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.11", "3.12", "3.13", "3.14"] | |
| steps: | |
| - name: Check out source | |
| uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 | |
| with: | |
| persist-credentials: false | |
| - name: Set up Python | |
| uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Set up uv | |
| uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0 | |
| with: | |
| enable-cache: true | |
| cache-dependency-glob: uv.lock | |
| - name: Verify dependency lock | |
| run: uv lock --check | |
| - name: Install locked project | |
| run: uv sync --locked --all-extras --dev | |
| - name: Lint | |
| run: uv run ruff check src tests experiments | |
| - name: Run tests | |
| run: uv run python -m unittest discover -s tests -t . -v | |
| - name: Compile source | |
| run: uv run python -m compileall -q src tests experiments | |
| wheel-smoke: | |
| name: Wheel/sdist install smoke (dispatch) | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - name: Check out source | |
| uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 | |
| with: | |
| persist-credentials: false | |
| - name: Set up Python | |
| uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0 | |
| with: | |
| python-version: "3.12" | |
| - name: Set up uv | |
| uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0 | |
| with: | |
| enable-cache: true | |
| cache-dependency-glob: uv.lock | |
| - name: Build and verify installed wheel and sdist | |
| run: | | |
| set -euo pipefail | |
| uv lock --check | |
| uv sync --locked --all-extras --dev | |
| uv run python -m build -o /tmp/dyro-dist | |
| smoke_root="$(mktemp -d)" | |
| cd "$smoke_root" | |
| uv run python -m venv "$smoke_root/wheel-venv" | |
| wheel_artifact="$(find /tmp/dyro-dist -maxdepth 1 -name 'dyro-*.whl' -print -quit)" | |
| "$smoke_root/wheel-venv/bin/pip" install "${wheel_artifact}" | |
| "$smoke_root/wheel-venv/bin/python" -c "import experiments.local_agent_dispatch" | |
| "$smoke_root/wheel-venv/bin/python" -I -c "import dyro.continuation" | |
| "$smoke_root/wheel-venv/bin/python" -I -c "from dyro.console.assets import validate_assets; validate_assets()" | |
| "$smoke_root/wheel-venv/bin/python" -I -c "from importlib.resources import files; root=files('dyro.integrations').joinpath('assets'); assert root.joinpath('dyro-control-plane','SKILL.md').is_file(); assert root.joinpath('dyro-control-plane','agents','openai.yaml').is_file(); assert not root.joinpath('dyro-readonly').is_dir()" | |
| test -x "$smoke_root/wheel-venv/bin/dyro" | |
| test ! -e "$smoke_root/wheel-venv/bin/dyro-bridge" | |
| test ! -e "$smoke_root/wheel-venv/bin/dyro-mcp" | |
| DYRO_LOCAL_AGENT_DISPATCH_HOME="$smoke_root/wheel-dispatch-home" "$smoke_root/wheel-venv/bin/dyro" dispatch doctor >"$smoke_root/dispatch-doctor.json" | |
| uv run python -m venv "$smoke_root/sdist-venv" | |
| sdist_artifact="$(find /tmp/dyro-dist -maxdepth 1 -name 'dyro-*.tar.gz' -print -quit)" | |
| "$smoke_root/sdist-venv/bin/pip" install "${sdist_artifact}" | |
| "$smoke_root/sdist-venv/bin/python" -I -c "import dyro.continuation" | |
| "$smoke_root/sdist-venv/bin/python" -I -c "from dyro.console.assets import validate_assets; validate_assets()" | |
| "$smoke_root/sdist-venv/bin/python" -I -c "from importlib.resources import files; root=files('dyro.integrations').joinpath('assets'); assert root.joinpath('dyro-control-plane','SKILL.md').is_file(); assert root.joinpath('dyro-control-plane','agents','openai.yaml').is_file(); assert not root.joinpath('dyro-readonly').is_dir()" | |
| test -x "$smoke_root/sdist-venv/bin/dyro" | |
| test ! -e "$smoke_root/sdist-venv/bin/dyro-bridge" | |
| test ! -e "$smoke_root/sdist-venv/bin/dyro-mcp" | |
| windows-dispatch-import: | |
| name: Windows dispatch import / fail-closed smoke | |
| runs-on: windows-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - name: Check out source | |
| uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 | |
| with: | |
| persist-credentials: false | |
| - name: Set up Python | |
| uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0 | |
| with: | |
| python-version: "3.13" | |
| - name: Install project | |
| run: python -m pip install . | |
| - name: Verify import and fail-closed execution | |
| run: | | |
| python -m experiments.local_agent_dispatch --dry-run doctor | |
| python tools/verify_windows_dispatch_import.py | |
| macos-dispatch-install: | |
| name: macOS clean install smoke | |
| runs-on: macos-15-intel | |
| timeout-minutes: 15 | |
| steps: | |
| - name: Check out source | |
| uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 | |
| with: | |
| persist-credentials: false | |
| - name: Set up Python | |
| uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0 | |
| with: | |
| python-version: "3.13" | |
| - name: Set up uv | |
| uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0 | |
| - name: Install locked project and smoke the CLI | |
| run: | | |
| uv lock --check | |
| uv sync --locked --all-extras --dev | |
| uv run dyro --version | |
| uv run dyro dispatch --dry-run doctor | |
| typescript-interop: | |
| name: TypeScript protocol interoperability | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - name: Check out source | |
| uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 | |
| with: | |
| persist-credentials: false | |
| - name: Set up Node.js | |
| uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7 | |
| with: | |
| node-version: "24" | |
| package-manager-cache: false | |
| - name: Install locked reference runner | |
| run: npm ci | |
| working-directory: examples/typescript-runner | |
| - name: Verify TypeScript interoperability | |
| run: npm test | |
| working-directory: examples/typescript-runner |