ci: type-check the semi-spread and swarm-builder-offline test scripts with stand-in values
This commit is contained in:
parent
a401b0c8ef
commit
de43dac33c
1 changed files with 321 additions and 259 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue