From 53fa738c6ed8b87039ec0850ea6115e1bbedac78 Mon Sep 17 00:00:00 2001 From: amackillop Date: Wed, 13 May 2026 10:46:14 -0700 Subject: [PATCH] Run library unit tests in check pipeline The nextest filter `--bin mdkd` only compiles tests under the `mdkd` binary target and skips every `#[cfg(test)] mod tests` in the `mdk` library crate (src/lib.rs and its module tree). Switching to `--lib --bin mdkd` adds the lib tests without pulling in `tests/integration.rs`, which needs VSS + Postgres and runs under `just integration-test` instead. --- flake.nix | 2 +- justfile | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/flake.nix b/flake.nix index e906c47..4eb5caf 100644 --- a/flake.nix +++ b/flake.nix @@ -195,7 +195,7 @@ commonArgs // { inherit cargoArtifacts; - cargoNextestExtraArgs = "--bin mdkd"; + cargoNextestExtraArgs = "--lib --bin mdkd"; } ); }; diff --git a/justfile b/justfile index 7810376..59eed3d 100644 --- a/justfile +++ b/justfile @@ -94,9 +94,9 @@ integration-test *args: fix: cargo clippy --all-targets --fix --allow-dirty --allow-staged -# Run tests (unit + doc; use `just integration-test` for integration tests) +# Run tests (lib + bin unit tests; use `just integration-test` for integration tests) test *args: - cargo nextest run --bin mdkd {{args}} + cargo nextest run --lib --bin mdkd {{args}} # Run the server run *args: