ci(rust): 新增 fmt/clippy/test 门禁;一次性 cargo fmt + 修 20 条 clippy 基线
Verify (Gitea) / gate (build · unit · facts) (push) Failing after 44s
Verify (Gitea) / gate (build · unit · facts) (push) Failing after 44s
This commit is contained in:
1 parent
8c9121f00d
commit
d72f28435e
2 files changed
+372
-148
No files matched your search
@@ -61,3 +61,26 @@ jobs:
|
||||
key: playwright-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
|
||||
- run: npx playwright install --with-deps chromium
|
||||
- run: npm run test:e2e
|
||||
|
||||
# 桌面端 Rust 门禁(2026-11-26 新增)。此前 25 个 tauri 命令、mac/Win32 双平台分支
|
||||
# 完全没有 CI,只能靠人工在 mac / win 上构建验证。
|
||||
# 选 macOS runner:Linux 编译 tauri 需要 webkit2gtk 等系统库,macOS 自带,成本也最低;
|
||||
# 且 src-tauri 的 #[cfg(target_os = "macos")] 分支只有 mac 能真正编译到。
|
||||
rust:
|
||||
name: rust (fmt · clippy · test)
|
||||
runs-on: macos-latest
|
||||
timeout-minutes: 30
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
components: rustfmt, clippy
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
workspaces: src-tauri
|
||||
- name: fmt
|
||||
run: cargo fmt --manifest-path src-tauri/Cargo.toml --all -- --check
|
||||
- name: clippy
|
||||
run: cargo clippy --manifest-path src-tauri/Cargo.toml --all-targets -- -D warnings
|
||||
- name: test
|
||||
run: cargo test --manifest-path src-tauri/Cargo.toml
|
||||
Reference in new issue
Block a user