fix(ci): fail the eval-test run when the suite does not pass (#350)

* fix(ci): fail the eval-test run when the suite does not pass

`nix eval .#evalTests` prints the suite result but exits 0 either way, so
both `just test` and the CI workflow reported success even when a test
failed. Compare the raw boolean and fail instead.

* fix(ci): use --json for the boolean eval result

`nix eval --raw` cannot coerce a Boolean to a string, and Just runs each
recipe line as a separate `nu -c`, so the result variable must stay on one
line.
This commit is contained in:
ryan4yin | 二花 authored and GitHub committed 2026-10-03 10:06:22 +08:00
1 parent d9208f492b
commit dafd16f447
2 files changed
+4 -4

No files matched your search

+1 -1
View File
@@ -21,7 +21,7 @@ default:
# Run eval tests
[group('nix')]
test:
nix eval .#evalTests --show-trace --print-build-logs --verbose
let result = (nix eval .#evalTests --json --show-trace --print-build-logs --verbose | str trim); if $result != "true" { error make { msg: $"eval tests failed: evalTests returned ($result)" } }
# Evaluate a NixOS host configuration without building it.
[group('nix')]