diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 67d3873..5300091 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -12,39 +12,37 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 - with: { python-version: "3.12" } - run: git diff --check - - run: python scripts/check-doc-links.py + - run: python3 scripts/check-doc-links.py backend-test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 - with: { python-version: "3.12" } - - run: pip install uv==0.9.24 + - name: 安装 uv + run: | + curl -LsSf https://astral.sh/uv/0.9.24/install.sh | sh + echo "$HOME/.local/bin" >> "$GITHUB_PATH" - run: uv sync --frozen working-directory: backend - run: uv run python -m compileall -q app working-directory: backend - run: uv run pytest working-directory: backend - - run: python scripts/phase3-production-acceptance.py --list-cases --json + - run: python3 scripts/phase3-production-acceptance.py --list-cases --json service-test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 - with: { python-version: "3.12" } - - uses: actions/setup-node@v4 - with: { node-version: "22", cache: pnpm, cache-dependency-path: "server sync/console/pnpm-lock.yaml" } - run: corepack enable && corepack prepare pnpm@10.28.0 --activate - run: pnpm install --frozen-lockfile && pnpm build working-directory: server sync/console - run: git diff --exit-code -- "server sync/sync_server/static" - - run: pip install uv==0.9.24 + - name: 安装 uv + run: | + curl -LsSf https://astral.sh/uv/0.9.24/install.sh | sh + echo "$HOME/.local/bin" >> "$GITHUB_PATH" - run: uv sync --frozen working-directory: backend - run: uv sync --frozen && uv run pytest @@ -57,8 +55,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: { node-version: "22", cache: pnpm, cache-dependency-path: frontend/pnpm-lock.yaml } - run: corepack enable && corepack prepare pnpm@10.28.0 --activate - run: pnpm install --frozen-lockfile working-directory: frontend @@ -69,7 +65,9 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@stable - with: { components: rustfmt, clippy } + - name: 安装 Rust 工具链 + run: | + curl --proto '=https' --tlsv1.2 -fsSL https://sh.rustup.rs | sh -s -- -y --profile minimal --component rustfmt,clippy + echo "$HOME/.cargo/bin" >> "$GITHUB_PATH" - run: cargo fmt --check && cargo test --lib --locked && cargo clippy --lib --locked -- -D warnings working-directory: frontend/src-tauri