run all tests on ci

This commit is contained in:
lassulus 2022-08-25 15:16:26 +02:00
parent 83fb8f661e
commit 0ffaac7913
3 changed files with 12 additions and 4 deletions

2
ci.nix
View File

@ -3,6 +3,6 @@ let
in {
test = pkgs.writeScript "test" ''
#!/bin/sh
nix-build "${toString ./tests/test.nix}";
nix-build "${toString ./tests}";
'';
}

View File

@ -9,11 +9,11 @@
};
checks.x86_64-linux = let
pkgs = nixpkgs.legacyPackages.x86_64-linux;
in {
in
# Run tests: nix flake check -L
nixos-test = pkgs.callPackage ./tests/test.nix {
import ./tests {
inherit pkgs;
makeTest = import (pkgs.path + "/nixos/tests/make-test-python.nix");
};
};
};
}

8
tests/default.nix Normal file
View File

@ -0,0 +1,8 @@
{ makeTest ? import <nixpkgs/nixos/tests/make-test-python.nix>
, pkgs ? (import <nixpkgs> {})
}@args:
{
luks-lvm = import ./luks-lvm.nix args;
mdadm = import ./mdadm.nix args;
zfs = import ./zfs.nix args;
}