checks: rename attributes for better discoverability
- all eval checks prefixed with `eval-` - all service checks prefixed with `service-`
This commit is contained in:
@@ -234,16 +234,16 @@ Failing nix eval tests look like this:
|
|||||||
> error: Tests failed
|
> error: Tests failed
|
||||||
```
|
```
|
||||||
|
|
||||||
To locate the definition, find the flake attribute name of the failing test near the top of the CI Job page, like for example `gitea:clan/clan-core#checks.x86_64-linux.lib-values-eval/1242`.
|
To locate the definition, find the flake attribute name of the failing test near the top of the CI Job page, like for example `gitea:clan/clan-core#checks.x86_64-linux.eval-lib-values/1242`.
|
||||||
|
|
||||||
In this case `lib-values-eval` is the attribute we are looking for.
|
In this case `eval-lib-values` is the attribute we are looking for.
|
||||||
|
|
||||||
Find the attribute via ripgrep:
|
Find the attribute via ripgrep:
|
||||||
|
|
||||||
```shellSession
|
```shellSession
|
||||||
$ rg "lib-values-eval ="
|
$ rg "eval-lib-values ="
|
||||||
lib/values/flake-module.nix
|
lib/values/flake-module.nix
|
||||||
21: lib-values-eval = pkgs.runCommand "tests" { nativeBuildInputs = [ pkgs.nix-unit ]; } ''
|
21: eval-lib-values = pkgs.runCommand "tests" { nativeBuildInputs = [ pkgs.nix-unit ]; } ''
|
||||||
grmpf@grmpf-nix ~/p/c/clan-core (test-docs)>
|
grmpf@grmpf-nix ~/p/c/clan-core (test-docs)>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -62,8 +62,9 @@ in
|
|||||||
in
|
in
|
||||||
lib.mkMerge [
|
lib.mkMerge [
|
||||||
# Add the VM tests as checks
|
# Add the VM tests as checks
|
||||||
(lib.mapAttrs (
|
(lib.mapAttrs' (
|
||||||
_name: testModule:
|
name: testModule:
|
||||||
|
lib.nameValuePair "service-${name}" (
|
||||||
nixosLib.runTest (
|
nixosLib.runTest (
|
||||||
{ ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
@@ -83,6 +84,7 @@ in
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
)
|
||||||
) cfg)
|
) cfg)
|
||||||
|
|
||||||
varsChecks
|
varsChecks
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ in
|
|||||||
{
|
{
|
||||||
legacyPackages.evalTests-values = tests;
|
legacyPackages.evalTests-values = tests;
|
||||||
checks = {
|
checks = {
|
||||||
lib-values-eval = pkgs.runCommand "tests" { nativeBuildInputs = [ pkgs.nix-unit ]; } ''
|
eval-lib-values = pkgs.runCommand "tests" { nativeBuildInputs = [ pkgs.nix-unit ]; } ''
|
||||||
export HOME="$(realpath .)"
|
export HOME="$(realpath .)"
|
||||||
nix-unit --eval-store "$HOME" \
|
nix-unit --eval-store "$HOME" \
|
||||||
--extra-experimental-features flakes \
|
--extra-experimental-features flakes \
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ in
|
|||||||
buildClan = self.clanLib.buildClan;
|
buildClan = self.clanLib.buildClan;
|
||||||
};
|
};
|
||||||
checks = {
|
checks = {
|
||||||
lib-build-clan-eval = pkgs.runCommand "tests" { nativeBuildInputs = [ pkgs.nix-unit ]; } ''
|
eval-lib-build-clan = pkgs.runCommand "tests" { nativeBuildInputs = [ pkgs.nix-unit ]; } ''
|
||||||
export HOME="$(realpath .)"
|
export HOME="$(realpath .)"
|
||||||
|
|
||||||
nix-unit --eval-store "$HOME" \
|
nix-unit --eval-store "$HOME" \
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
checks = {
|
checks = {
|
||||||
lib-distributedServices-eval = pkgs.runCommand "tests" { nativeBuildInputs = [ pkgs.nix-unit ]; } ''
|
eval-lib-distributedServices = pkgs.runCommand "tests" { nativeBuildInputs = [ pkgs.nix-unit ]; } ''
|
||||||
export HOME="$(realpath .)"
|
export HOME="$(realpath .)"
|
||||||
nix-unit --eval-store "$HOME" \
|
nix-unit --eval-store "$HOME" \
|
||||||
--extra-experimental-features flakes \
|
--extra-experimental-features flakes \
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ in
|
|||||||
devShells.inventory-schema = pkgs.mkShell {
|
devShells.inventory-schema = pkgs.mkShell {
|
||||||
name = "clan-inventory-schema";
|
name = "clan-inventory-schema";
|
||||||
inputsFrom = with config.checks; [
|
inputsFrom = with config.checks; [
|
||||||
lib-inventory-eval
|
eval-lib-inventory
|
||||||
self'.devShells.default
|
self'.devShells.default
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
@@ -62,7 +62,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
checks = {
|
checks = {
|
||||||
lib-inventory-eval = pkgs.runCommand "tests" { nativeBuildInputs = [ pkgs.nix-unit ]; } ''
|
eval-lib-inventory = pkgs.runCommand "tests" { nativeBuildInputs = [ pkgs.nix-unit ]; } ''
|
||||||
export HOME="$(realpath .)"
|
export HOME="$(realpath .)"
|
||||||
export NIX_ABORT_ON_WARN=1
|
export NIX_ABORT_ON_WARN=1
|
||||||
nix-unit --eval-store "$HOME" \
|
nix-unit --eval-store "$HOME" \
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ in
|
|||||||
clan-core = self;
|
clan-core = self;
|
||||||
pkgs = inputs.nixpkgs.legacyPackages.${system};
|
pkgs = inputs.nixpkgs.legacyPackages.${system};
|
||||||
};
|
};
|
||||||
checks.module-clan-vars-eval = pkgs.runCommand "tests" { nativeBuildInputs = [ pkgs.nix-unit ]; } ''
|
checks.eval-module-clan-vars = pkgs.runCommand "tests" { nativeBuildInputs = [ pkgs.nix-unit ]; } ''
|
||||||
export HOME="$(realpath .)"
|
export HOME="$(realpath .)"
|
||||||
|
|
||||||
nix-unit --eval-store "$HOME" \
|
nix-unit --eval-store "$HOME" \
|
||||||
|
|||||||
Reference in New Issue
Block a user