From 24fae5a6465f0a163c8bf9da5f1ae7df5e024f72 Mon Sep 17 00:00:00 2001 From: Suradet Pratomsak Date: Sat, 17 Oct 2026 09:09:56 +0700 Subject: [PATCH] fix(ci): run the full workspace test suite CI ran 'cargo test --lib', which only builds library targets. The two unit tests in crates/app/src/state.rs (a binary target) never ran, and the nine doctests never ran either. 'cargo test --workspace' runs unit tests from all targets plus doctests, raising the executed test count from 35 to 46. Updates the CONTRIBUTING.md job table and local checklist, and the ROADMAP CI summary, to match. Closes #39. --- .github/workflows/ci.yml | 2 +- docs/CONTRIBUTING.md | 4 ++-- docs/ROADMAP.md | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3136db9..b2ac68e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -67,7 +67,7 @@ jobs: with: toolchain: stable - uses: Swatinem/rust-cache@23869a5bd66c73db3c0ac40331f3206eb23791dc # v2.9.1 - - run: cargo test --lib + - run: cargo test --workspace audit: name: Audit diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index a8d57f1..c86115e 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -31,7 +31,7 @@ Every PR must pass all jobs (defined in `.github/workflows/ci.yml`): | Check | `cargo check -p codeframe-app --target wasm32-unknown-unknown` | Compile errors in the WASM target | | Clippy | `cargo clippy --workspace --all-targets -- -D clippy::correctness -D clippy::suspicious` | Correctness and suspicious lints | | Format | `cargo fmt --all --check` | Formatting drift | -| Test | `cargo test --lib` | Unit test failures | +| Test | `cargo test --workspace` | Unit, binary target, and doc test failures | | Audit | `cargo audit` | Dependency advisories | | Deny | `cargo deny check` | License + yanked-crate policy | | Hex Audit | grep over `style.css` | Raw hex colors outside token definitions | @@ -44,7 +44,7 @@ Run all checks locally before pushing: ```sh cargo fmt --all --check cargo clippy --workspace --all-targets -- -D clippy::correctness -D clippy::suspicious -cargo test --lib +cargo test --workspace cargo check -p codeframe-app --target wasm32-unknown-unknown trunk build --release ``` diff --git a/docs/ROADMAP.md b/docs/ROADMAP.md index f0b0c38..0c6d46a 100644 --- a/docs/ROADMAP.md +++ b/docs/ROADMAP.md @@ -45,7 +45,7 @@ shape are listed under "Out of Scope" so the line is drawn on purpose. `highlighter` (syntect wrapper, framework-agnostic), `renderer` (Canvas2D drawing, no Leptos), `app` (the only Leptos-aware crate). - **CI** (`.github/workflows/ci.yml`): 10 jobs - `check` (WASM), `clippy`, - `fmt --check`, `test` (`cargo test --lib`), `cargo audit`, `cargo deny`, + `fmt --check`, `test` (`cargo test --workspace`), `cargo audit`, `cargo deny`, `hex-audit` (no raw hex outside CSS tokens), `csp-verify` (validates the CSP in `vercel.json`), gated `trunk build --release`, and `perf-budget` (WASM gzipped ≤ 1200 KB, total bundle ≤ 1350 KB). SHA-pinned actions,