summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2022-08-25 15:16:26 +0200
committerlassulus <lassulus@lassul.us>2022-08-25 23:31:05 +0200
commit0ffaac7913565e497c5193d45fd50de78f3241f0 (patch)
treea8cf1f0043557d7408d8b1ed55fd88028418fe7e
parent83fb8f661eb574f32fad1d51bbebd0c36595db01 (diff)
run all tests on ci
-rw-r--r--ci.nix2
-rw-r--r--flake.nix6
-rw-r--r--tests/default.nix8
3 files changed, 12 insertions, 4 deletions
diff --git a/ci.nix b/ci.nix
index cdb3198..3c49ab1 100644
--- a/ci.nix
+++ b/ci.nix
@@ -3,6 +3,6 @@ let
in {
test = pkgs.writeScript "test" ''
#!/bin/sh
- nix-build "${toString ./tests/test.nix}";
+ nix-build "${toString ./tests}";
'';
}
diff --git a/flake.nix b/flake.nix
index 3e7263a..488933d 100644
--- a/flake.nix
+++ b/flake.nix
@@ -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");
};
- };
};
}
diff --git a/tests/default.nix b/tests/default.nix
new file mode 100644
index 0000000..3b24ba6
--- /dev/null
+++ b/tests/default.nix
@@ -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;
+}