mirror of
https://gitlab.com/TECHNOFAB/nix-gitlab-ci.git
synced 2025-12-12 02:00:13 +01:00
test: add basic test for flakeModule functionality
This commit is contained in:
parent
0952ab4145
commit
e074d716c4
7 changed files with 73 additions and 6 deletions
18
nix/repo/flake.lock
generated
18
nix/repo/flake.lock
generated
|
|
@ -17,9 +17,27 @@
|
|||
"type": "gitlab"
|
||||
}
|
||||
},
|
||||
"nixtest-lib": {
|
||||
"locked": {
|
||||
"dir": "lib",
|
||||
"lastModified": 1753957623,
|
||||
"narHash": "sha256-kdImwKx57N0QL8HPUUb5ADwXFgSjaNOk39b/eKlzyTo=",
|
||||
"owner": "TECHNOFAB",
|
||||
"repo": "nixtest",
|
||||
"rev": "22b43c9fe83be73c3f0648bbb54bc3c1cf7f96df",
|
||||
"type": "gitlab"
|
||||
},
|
||||
"original": {
|
||||
"dir": "lib",
|
||||
"owner": "TECHNOFAB",
|
||||
"repo": "nixtest",
|
||||
"type": "gitlab"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"devshell-lib": "devshell-lib",
|
||||
"nixtest-lib": "nixtest-lib",
|
||||
"treefmt-nix": "treefmt-nix"
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
inputs = {
|
||||
devshell-lib.url = "gitlab:rensa-nix/devshell?dir=lib";
|
||||
nixtest-lib.url = "gitlab:TECHNOFAB/nixtest?dir=lib";
|
||||
treefmt-nix = {
|
||||
url = "github:numtide/treefmt-nix";
|
||||
flake = false;
|
||||
|
|
@ -10,6 +11,7 @@
|
|||
i
|
||||
// {
|
||||
devshell = i.devshell-lib.lib {inherit (i.parent) pkgs;};
|
||||
ntlib = i.nixtest-lib.lib {inherit (i.parent) pkgs;};
|
||||
cilib = import "${i.parent.self}/lib" {inherit (i.parent) pkgs;};
|
||||
treefmt = import i.treefmt-nix;
|
||||
};
|
||||
|
|
|
|||
10
nix/repo/tests.nix
Normal file
10
nix/repo/tests.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
{inputs, ...}: let
|
||||
inherit (inputs) pkgs ntlib cilib;
|
||||
in {
|
||||
tests = ntlib.mkNixtest {
|
||||
modules = ntlib.autodiscover {dir = "${inputs.self}/tests";};
|
||||
args = {
|
||||
inherit pkgs ntlib cilib;
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue