Skip to content

refactor(logging): 收紧 AI 回调投递日志为从句叙事 #1165

refactor(logging): 收紧 AI 回调投递日志为从句叙事

refactor(logging): 收紧 AI 回调投递日志为从句叙事 #1165

Workflow file for this run

name: CI
on:
push:
branches: [ main, master, dev, dev-v2 ]
pull_request:
branches: [ main, master, dev, dev-v2 ]
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
- name: Run Ruff linting
run: |
uv run ruff check --output-format=github pallas/ packages/
- name: Run Ruff formatting check
run: |
uv run ruff format --check pallas/ packages/
- name: Check plugin imports (packages)
run: |
uv run python tools/check_plugin_imports.py --scope packages
- name: Build pallas-core wheel
run: |
./scripts/build_core.sh
test -f build/pallas-core/dist/pallas_core-*.whl
- name: Run core plugin matrix tests
run: |
# registry / coord 与 loader 分进程:loader 会 nonebot.load_plugin,
# 同进程内再 import packages.* 或二次 load 易触发插件槽冲突
uv run pytest \
tests/common/test_plugin_matrix.py \
tests/common/test_plugin_registry.py \
tests/common/test_plugin_coord.py \
tests/common/test_shard_coord_duel_group.py \
tests/common/test_shard_coord_spy_group.py \
-q
uv run pytest tests/common/test_plugin_loader_unified.py -q
- name: Check console OpenAPI spec drift
run: |
uv run python tools/check_console_openapi_drift.py
- 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 .