Repository navigation
feat(ops): P2-2 SSH 运维模块(主机/终端 POST 轮询/批量执行/片段/日志跟踪) #24
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: backend | |
| on: | |
| push: | |
| paths: | |
| - "backend/**" | |
| - ".github/workflows/backend-ci.yml" | |
| pull_request: | |
| paths: | |
| - "backend/**" | |
| - ".github/workflows/backend-ci.yml" | |
| workflow_dispatch: | |
| defaults: | |
| run: | |
| working-directory: backend | |
| jobs: | |
| lint-and-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: 安装 uv | |
| uses: astral-sh/setup-uv@v5 | |
| with: | |
| enable-cache: true | |
| - name: 安装依赖(含 sqlite 与 mysql 驱动;测试用 sqlite + fakeredis) | |
| run: uv sync --extra sqlite --extra mysql | |
| - name: 代码检查(ruff) | |
| run: uv run ruff check | |
| - name: 单元测试(pytest) | |
| run: uv run pytest -q |