From 0ffaac7913565e497c5193d45fd50de78f3241f0 Mon Sep 17 00:00:00 2001 From: lassulus Date: Thu, 25 Aug 2022 15:16:26 +0200 Subject: run all tests on ci --- ci.nix | 2 +- flake.nix | 6 +++--- tests/default.nix | 8 ++++++++ 3 files changed, 12 insertions(+), 4 deletions(-) create mode 100644 tests/default.nix 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 +, pkgs ? (import {}) +}@args: +{ + luks-lvm = import ./luks-lvm.nix args; + mdadm = import ./mdadm.nix args; + zfs = import ./zfs.nix args; +} -- cgit v1.2.3