fix(initialization): 优化 uv 最新版安装与失败回退 #5
Workflow file for this run
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
| # AUTO-MAS: A Multi-Script, Multi-Config Management and Automation Software | |
| # Copyright © 2025-2026 AUTO-MAS Team | |
| # This file is part of AUTO-MAS. | |
| # AUTO-MAS is free software: you can redistribute it and/or modify | |
| # it under the terms of the GNU Affero General Public License as | |
| # published by the Free Software Foundation, either version 3 of | |
| # the License, or (at your option) any later version. | |
| # AUTO-MAS is distributed in the hope that it will be useful, | |
| # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| # GNU Affero General Public License for more details. | |
| # You should have received a copy of the GNU Affero General Public License | |
| # along with AUTO-MAS. If not, see <https://www.gnu.org/licenses/>. | |
| name: 自动化测试 | |
| on: | |
| pull_request: | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: backend-tests-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| backend: | |
| name: Windows / Python 3.12 | |
| runs-on: windows-latest | |
| timeout-minutes: 20 | |
| steps: | |
| - name: 检出代码 | |
| uses: actions/checkout@v4 | |
| - name: 安装 uv 和 Python | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| python-version: "3.12" | |
| enable-cache: true | |
| - name: 同步测试依赖 | |
| run: uv sync --frozen --group test --group dev --group plugins | |
| - name: 运行后端测试 | |
| run: uv run --no-sync pytest --junitxml=test-results/pytest.xml | |
| - name: 上传测试报告 | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: backend-test-results | |
| path: test-results/ | |
| if-no-files-found: error | |
| retention-days: 14 | |
| frontend: | |
| name: Linux / Node.js 20 | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| defaults: | |
| run: | |
| working-directory: frontend | |
| steps: | |
| - name: 检出代码 | |
| uses: actions/checkout@v4 | |
| - name: 安装 Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| - name: 启用 Yarn | |
| run: | | |
| corepack enable | |
| corepack prepare yarn@4.9.1 --activate | |
| - name: 安装前端依赖 | |
| run: yarn install --immutable | |
| - name: 运行前端测试 | |
| run: yarn test |