Skip to content

feat: 解耦 CLI 协议并接入异步 Qt 客户端 #865

feat: 解耦 CLI 协议并接入异步 Qt 客户端

feat: 解耦 CLI 协议并接入异步 Qt 客户端 #865

Workflow file for this run

name: CI
on:
push:
branches: [ main, master ]
pull_request:
branches: [ main, master ]
jobs:
test:
# 源码全量测试只在 ubuntu 跑;Windows 侧仅跑打包产物集成测试(tests/exe/),
# 由 build-exe.yml 打包后覆盖,避免非打包测试在 Windows 重复跑一遍。
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v5
with:
submodules: recursive
- name: Install system dependencies (OpenGL/EGL/PulseAudio)
run: |
sudo apt-get update
sudo apt-get install -y libegl1 libgl1 libpulse0 libxkbcommon-dev
- name: Set up uv
uses: astral-sh/setup-uv@v7
- name: Compile Python files
run: |
uv run python -m compileall -q -x '\.venv' .
- name: Lint with ruff
run: |
uv run ruff check python-backend python-gui tools runner
- name: Format check with ruff
run: |
uv run ruff format --check python-backend python-gui tools runner
- name: Run tests
run: |
uv run python -m unittest discover -s python-backend/tests -t python-backend -p 'test*.py'
uv run python -m unittest discover -s python-gui/tests -t python-gui -p 'test*.py'
- name: Set up Rust prototype toolchain
run: rustup toolchain install 1.97.1 --profile minimal --component rustfmt --component clippy
- name: Check Rust prototype
run: |
cargo +1.97.1 fmt --manifest-path rust-gui/Cargo.toml --check
cargo +1.97.1 clippy --manifest-path rust-gui/Cargo.toml --locked --all-features --all-targets -- -D warnings
- name: Test Rust against Python CLI
env:
ODH_TEST_PYTHON: ${{ github.workspace }}/.venv/bin/python
run: cargo +1.97.1 test --manifest-path rust-gui/Cargo.toml --locked --all-features