Files
LangBot/.github/workflows/plugins-local-agent-tests.yml
huanghuoguoguo 1f227f7aa8 ci: scope PR checks and run the complete matrix daily (#3056)
* ci: streamline pull request checks and run the full matrix daily

Refs #3055

* ci: run runtime contracts only on affected Core checks

* test(ci): distinguish SDK checks from SDK publication

* fix(ci): retain legacy regressions and scope production image builds

* docs(ci): clarify focused regressions and production image selection
2026-11-17 17:31:50 +08:00

58 lines
1.9 KiB
YAML

name: Plugins / LocalAgent tests
on:
# PRs exercise this consumer via plugins-runner-tests.yml; keep isolated manual repro.
workflow_dispatch:
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout plugins
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Set up uv
uses: astral-sh/setup-uv@v5
- name: Keep environment outside the checkout
run: |
printf 'UV_PROJECT_ENVIRONMENT=%s/local-agent-venv\n' "$RUNNER_TEMP" >> "$GITHUB_ENV"
- name: Install dependencies with the latest stable SDK
run: uv sync --extra dev --upgrade-package langbot-plugin
working-directory: plugins/Runner/LocalAgent
- name: Report SDK version and verify explicit-export contract
run: uv run --no-sync python -c 'from importlib.metadata import version; print("langbot-plugin", version("langbot-plugin")); from inspect import signature; from langbot_plugin.api.entities.builtin.runner.context import RunnerContext; assert "paths" in signature(RunnerContext.export_box_files).parameters'
working-directory: plugins/Runner/LocalAgent
- name: Ruff check
run: uv run --no-sync ruff check .
working-directory: plugins/Runner/LocalAgent
- name: Ruff format check
run: uv run --no-sync ruff format --check .
working-directory: plugins/Runner/LocalAgent
- name: Pytest
run: uv run --no-sync pytest
working-directory: plugins/Runner/LocalAgent
- name: Test LocalAgent with the in-tree SDK
working-directory: plugins/Runner/LocalAgent
run: |
uv pip install --python "$UV_PROJECT_ENVIRONMENT/bin/python" ../../../sdk
uv pip check --python "$UV_PROJECT_ENVIRONMENT/bin/python"
uv run --no-sync pytest