feat: switch to module system to evaluate suites & tests

add autodiscovery feature
This commit is contained in:
technofab 2025-06-12 21:23:28 +02:00
parent e8da91ad27
commit 98141a1f5c
No known key found for this signature in database
5 changed files with 312 additions and 95 deletions

View file

@ -236,7 +236,7 @@
ci = {
stages = ["test" "build" "deploy"];
jobs = {
"test" = {
"test:flakeModule" = {
stage = "test";
script = [
"nix run .#nixtests:run -- --junit=junit.xml"
@ -247,6 +247,17 @@
reports.junit = "junit.xml";
};
};
"test:lib" = {
stage = "test";
script = [
"nix run .#lib-tests -- --junit=junit.xml"
];
allow_failure = true;
artifacts = {
when = "always";
reports.junit = "junit.xml";
};
};
"test:go" = {
stage = "test";
nix.deps = with pkgs; [go go-junit-report gocover-cobertura];
@ -300,7 +311,17 @@
};
};
packages.default = pkgs.callPackage ./package.nix {};
packages = let
ntlib = import ./lib {inherit pkgs lib;};
in {
default = pkgs.callPackage ./package.nix {};
lib-tests = ntlib.mkNixtest {
modules = ntlib.autodiscover {dir = ./lib;};
args = {
inherit pkgs;
};
};
};
};
};