ci: guard test-unit clauses and the rust-cache workspace root

Fail just test-unit when any combined-filter clause selects no tests, so a
renamed module or target cannot silently drop out of the union. Add a
cargo-metadata check that no dependency manifest sits under the workspace
root, run in Unit Tests before rust-cache can save, and select desktop jobs
for bin/hermit.hcl changes. Refresh comments that described removed flags.

Signed-off-by: Elrond <28d6302a099e5225b02c4155ac4236e4912603df2ab08dbfc2f4fef08ce598c8@buzz.block.builderlab.xyz>
This commit is contained in:
Elrond
2026-10-09 11:05:23 -04:00
parent 7f465fac2a
commit 8a74f7beff
7 changed files with 134 additions and 10 deletions

View File

@@ -64,6 +64,12 @@ jobs:
uses: taiki-e/install-action@0fd46367812ee04360509b4169d9f659d6892bb2 # v2.79.15
with:
tool: cargo-nextest@0.9.136
# Every Hermit + rust-cache job resolves the same CARGO_HOME (Hermit
# re-applies bin/hermit.hcl on each exec), so checking once here covers
# them. Runs on PRs too, and on main fails before rust-cache's
# success()-gated post-save can store an empty root-workspace cache.
- name: Rust cache workspace-root contract
run: cargo metadata --all-features --format-version 1 | node scripts/check-rust-cache-workspace-root.mjs
- name: Unit tests
run: just test-unit

View File

@@ -70,6 +70,7 @@ jobs:
desktop:
- '.github/workflows/ci.yml'
- '.github/workflows/_ci-desktop.yml'
- 'bin/hermit.hcl'
- 'scripts/ci-apt-retry.sh'
- 'Justfile'
- 'scripts/generate-macos-icon.py'
@@ -135,7 +136,7 @@ jobs:
- name: CI required-context isolation contract
run: scripts/test-ci-required-context-isolation.sh
- name: CI path selection regression tests
run: node --test scripts/ci-selection.test.mjs scripts/ci-required-gates.test.mjs scripts/ci-apt-retry.test.mjs
run: node --test scripts/ci-selection.test.mjs scripts/ci-required-gates.test.mjs scripts/ci-apt-retry.test.mjs scripts/check-rust-cache-workspace-root.test.mjs
- name: File size policy
run: just file-size-check