docs(persona): A6 牛格分化与各路线交叉引用 #590
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, master, dev ] | |
| pull_request: | |
| branches: [ main, master, dev ] | |
| workflow_dispatch: | |
| jobs: | |
| lint-and-format: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.12"] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v8.1.0 | |
| with: | |
| version: "latest" | |
| - name: Set up Python ${{ matrix.python-version }} | |
| run: uv python install ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| # core plugin matrix 测试会加载 kernel/LLM 与分片 coord(需 sqlalchemy、redis) | |
| uv sync --dev --extra pg --extra coord-redis | |
| - name: Run Ruff linting | |
| run: | | |
| uv run ruff check --output-format=github src/ | |
| - name: Run Ruff formatting check | |
| run: | | |
| uv run ruff format --check src/ | |
| - name: Run core plugin matrix tests | |
| run: | | |
| uv run pytest \ | |
| tests/common/test_plugin_matrix.py \ | |
| tests/common/test_plugin_loader_unified.py \ | |
| tests/common/test_plugin_coord.py \ | |
| tests/common/test_plugin_registry.py \ | |
| tests/common/test_shard_coord_duel_group.py \ | |
| tests/common/test_shard_coord_spy_group.py \ | |
| -q | |
| - name: Type check with mypy | |
| run: | | |
| # uv run mypy src/ | |
| dependency-check: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v8.1.0 | |
| - name: Check dependency vulnerabilities | |
| run: | | |
| uv sync --dev | |
| # 检查已知漏洞 | |
| uv run pip-audit || true | |
| build-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Test Docker build | |
| run: | | |
| LABEL="$(git describe --tags --always --dirty 2>/dev/null || true)" | |
| if [ -z "${LABEL}" ]; then LABEL="sha-${GITHUB_SHA:0:7}"; fi | |
| docker build --build-arg "PALLAS_BOT_VERSION=${LABEL}" -t test-build . |