ci: sibling 检出 AuthCore 以匹配 Cargo [patch] ../AuthCore

GHA 默认只检出 huike-back,导致 ../AuthCore 不存在。将本仓库检出到 huike-back/、AuthCore 检出到同级目录,并在子目录运行 cargo check;rust-cache 指向 huike-back workspace。

根 Cargo.toml 保留 ../AuthCore patch,避免把 AuthCore 嵌进本 workspace(否则会继承 huike-back 的 workspace.dependencies 而缺依赖)。

Made-with: Cursor
This commit is contained in:
2026-04-24 08:07:30 +08:00
parent bcd2c50729
commit d1f7db2ab7
2 changed files with 16 additions and 1 deletions
+13 -1
View File
@@ -13,8 +13,17 @@ jobs:
timeout-minutes: 30
steps:
- name: Checkout
# Two sibling directories: `huike-back/` (this repo) and `AuthCore/` — matches root `Cargo.toml` [patch] paths `../AuthCore/...`.
- name: Checkout huike-back
uses: actions/checkout@v4
with:
path: huike-back
- name: Checkout AuthCore (Cargo path patch)
uses: actions/checkout@v4
with:
repository: alchemy-studio/AuthCore
path: AuthCore
- name: Install system dependencies
run: |
@@ -26,6 +35,9 @@ jobs:
- name: Cache cargo registry and target
uses: Swatinem/rust-cache@v2
with:
workspaces: huike-back
- name: Cargo check workspace
working-directory: huike-back
run: cargo check --workspace --all-targets