mirror of
https://gitlab.com/TECHNOFAB/nixtest.git
synced 2025-12-12 02:00:18 +01:00
feat: switch to module system to evaluate suites & tests
add autodiscovery feature
This commit is contained in:
parent
e8da91ad27
commit
98141a1f5c
5 changed files with 312 additions and 95 deletions
25
flake.nix
25
flake.nix
|
|
@ -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;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue