Files
RuoYi-Vue3-FastAPI/.github/workflows/native-plugin.yml
T
insistence 4bd83bc7cd feat: 支持 v2 插件、独立前端和签名制品发布 (#130)
* feat: 支持 v2 插件、原生扩展与签名发布

* fix: 修复测试

* feat: 增强宿主 SDK、运行观测与制品维护能力

* feat: 增强文件传输、配置观测与本地开发能力

* feat: 支持 SSE 实时事件流并完善开发脚手架

* feat: 完善长连接鉴权复核与关闭回收

* feat: 增强生命周期与任务关闭可靠性

* feat: 收紧健康检查契约并补齐前端与真实网络验收

* feat: 增加SDK溯源与离线更新工具并验证跨版本兼容

* feat: 增加持久化业务示例与受控 Python 交付

* feat: 增加统一运行诊断与多worker状态观测

* feat: 增加固定目标发布等待与自动验收

* fix: 修复多环境插件部署前缀与代理配置不一致

* fix: 修复测试
2026-10-09 23:49:45 +08:00

98 lines
5.4 KiB
YAML

name: Native Plugin
on:
push:
branches: [master]
paths:
- 'ruoyi-fastapi-backend/plugins/core/**'
- 'ruoyi-fastapi-backend/plugins/examples/rust/**'
- 'ruoyi-fastapi-backend/plugins/examples/python/task_demo/**'
- 'ruoyi-fastapi-backend/scripts/plugin_task_integration.py'
- 'ruoyi-fastapi-backend/scripts/build_native_plugin.py'
- 'ruoyi-fastapi-backend/cli/runtime/plugin/scaffold/**'
- 'ruoyi-fastapi-backend/cli/runtime/plugin/sdk.py'
- 'ruoyi-fastapi-backend/cli/groups/plugin/commands/developer.py'
- 'ruoyi-fastapi-backend/cli/groups/plugin/commands/sdk.py'
- 'ruoyi-fastapi-backend/cli/groups/plugin/commands/artifact*.py'
- 'ruoyi-fastapi-backend/cli/groups/plugin/artifact_controller.py'
- 'ruoyi-fastapi-backend/cli/groups/plugin/command.py'
- 'ruoyi-fastapi-frontend/src/utils/pluginBridge*'
- 'ruoyi-fastapi-backend/pyproject.toml'
- 'ruoyi-fastapi-backend/tests/cli/runtime/plugin/test_runtime_scaffold*.py'
- 'ruoyi-fastapi-backend/tests/cli/runtime/plugin/test_runtime_sdk.py'
- 'ruoyi-fastapi-backend/tests/cli/root/test_plugin_sdk_commands.py'
- 'ruoyi-fastapi-backend/tests/cli/root/test_plugin_artifact_commands.py'
- 'ruoyi-fastapi-backend/tests/cli/root/test_plugin_release_wait.py'
- 'ruoyi-fastapi-backend/tests/plugins/**'
- '.github/workflows/native-plugin.yml'
pull_request:
branches: [master]
paths:
- 'ruoyi-fastapi-backend/plugins/core/**'
- 'ruoyi-fastapi-backend/plugins/examples/rust/**'
- 'ruoyi-fastapi-backend/plugins/examples/python/task_demo/**'
- 'ruoyi-fastapi-backend/scripts/plugin_task_integration.py'
- 'ruoyi-fastapi-backend/scripts/build_native_plugin.py'
- 'ruoyi-fastapi-backend/cli/runtime/plugin/scaffold/**'
- 'ruoyi-fastapi-backend/cli/runtime/plugin/sdk.py'
- 'ruoyi-fastapi-backend/cli/groups/plugin/commands/developer.py'
- 'ruoyi-fastapi-backend/cli/groups/plugin/commands/sdk.py'
- 'ruoyi-fastapi-backend/cli/groups/plugin/commands/artifact*.py'
- 'ruoyi-fastapi-backend/cli/groups/plugin/artifact_controller.py'
- 'ruoyi-fastapi-backend/cli/groups/plugin/command.py'
- 'ruoyi-fastapi-frontend/src/utils/pluginBridge*'
- 'ruoyi-fastapi-backend/pyproject.toml'
- 'ruoyi-fastapi-backend/tests/cli/runtime/plugin/test_runtime_scaffold*.py'
- 'ruoyi-fastapi-backend/tests/cli/runtime/plugin/test_runtime_sdk.py'
- 'ruoyi-fastapi-backend/tests/cli/root/test_plugin_sdk_commands.py'
- 'ruoyi-fastapi-backend/tests/cli/root/test_plugin_artifact_commands.py'
- 'ruoyi-fastapi-backend/tests/cli/root/test_plugin_release_wait.py'
- 'ruoyi-fastapi-backend/tests/plugins/**'
- '.github/workflows/native-plugin.yml'
workflow_dispatch:
jobs:
native:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
python: ['3.10', '3.11', '3.12', '3.13']
runs-on: ${{ matrix.os }}
defaults:
run:
working-directory: ruoyi-fastapi-backend
steps:
- uses: actions/checkout@v5
- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python }}
cache: pip
cache-dependency-path: ruoyi-fastapi-backend/requirements.txt
- name: Install host and build dependencies
run: python -m pip install -r requirements.txt 'maturin>=1.15,<2' pytest pytest-asyncio aiosqlite
- name: Install Rust
run: rustup toolchain install 1.99.0 --profile minimal --component rustfmt --component clippy
- name: Select Rust
run: rustup default 1.99.0
- name: Check Rust formatting
run: cargo fmt --manifest-path plugins/examples/rust/rust_demo/Cargo.toml --check
- name: Verify v1 and v2 plugin scaffolds
run: python -m pytest tests/cli/runtime/plugin/test_runtime_scaffold.py tests/cli/runtime/plugin/test_runtime_scaffold_v2.py -q
- name: Verify SDK provenance and offline update commands
run: python -m pytest tests/cli/runtime/plugin/test_runtime_sdk.py tests/cli/root/test_plugin_sdk_commands.py -q
- name: Verify persistent task plugin
run: python -m pytest tests/plugins/examples/test_task_demo.py -q
- name: Build and assemble source-free plugin
run: python scripts/build_native_plugin.py --output target/native-package
- name: Check Rust code
run: cargo clippy --manifest-path plugins/examples/rust/rust_demo/Cargo.toml --locked -- -D warnings
- name: Exercise native library through the host runtime
env:
RUOYI_NATIVE_PLUGIN_DIR: ${{ github.workspace }}/ruoyi-fastapi-backend/target/native-package/rust_demo
run: python -m pytest tests/plugins/native tests/plugins/core/native tests/plugins/core/runtime/test_host_services.py tests/plugins/core/runtime/test_job_dispatcher.py -q
- name: Verify signed artifacts and maintenance releases
env:
RUOYI_NATIVE_PLUGIN_DIR: ${{ github.workspace }}/ruoyi-fastapi-backend/target/native-package/rust_demo
run: python -m pytest tests/plugins/core/artifacts tests/plugins/core/deployment tests/plugins/core/management/test_release_dao.py tests/plugins/core/management/test_artifact_views.py tests/module_plugin/controller/test_plugin_release_controller.py tests/cli/root/test_plugin_artifact_commands.py tests/cli/root/test_plugin_release_wait.py tests/sql/test_plugin_release_schema.py -q