Watch
0
0
Fork
You've already forked hyperhive
0

ci: type-check the semi-spread and swarm-builder-offline test scripts with stand-in values

This commit is contained in:
atlas 2026-11-13 08:13:51 +01:00
commit de43dac33c

View file

@ -54,13 +54,18 @@ let
echo -n "$testScript" >> testScriptWithTypes
'';
# The tests that interpolate node config or an agent toplevel name a stand-in
# script in `passthru.typecheckScript`, built by the same function as their real
# `testScript`; reading `testScriptString` there would evaluate a NixOS system.
scriptOf = test: test.config.passthru.typecheckScript or test.config.testScriptString;
typecheck =
name: test:
pkgs.runCommand "vm-test-typecheck-${name}"
(
checkInputs
// {
testScript = test.config.testScriptString;
testScript = scriptOf test;
hints = hintsFor test;
}
)
@ -120,10 +125,6 @@ let
touch $out
'';
# semi-spread and swarm-builder-offline are not listed: they interpolate node
# config or an agent toplevel into their script, so reading the script text
# evaluates a NixOS system. They need their script to be a function of those
# values first.
tests = {
inherit (vmTests)
hive-squid
@ -131,6 +132,8 @@ let
agent-ephemeral-rootfs
full-setup
wg-hive
semi-spread
swarm-builder-offline
;
};
in