mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-11-13 12:13:36 +01:00
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:
1 parent
d9208f492b
commit
dafd16f447
2 files changed
+4
-4
No files matched your search
@@ -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')]
|
||||
|
||||
Reference in new issue
Block a user