From 3e4e67b1e3edc129de56bc0b2c92d75cf454405b Mon Sep 17 00:00:00 2001 From: David Niehues <7667041+DavidNiehues@users.noreply.github.com> Date: Tue, 12 Aug 2025 11:20:01 +0200 Subject: [PATCH] chore(tests): Add integration tests to checks in main flake.nix --- flake.lock | 21 +++++++++++++++++++++ flake.nix | 15 ++++++++++++++- 2 files changed, 35 insertions(+), 1 deletion(-) diff --git a/flake.lock b/flake.lock index a9dacb8..af53c6c 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,25 @@ { "nodes": { + "flake-parts": { + "inputs": { + "nixpkgs-lib": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1754487366, + "narHash": "sha256-pHYj8gUBapuUzKV/kN/tR3Zvqc7o6gdFB9XKXIp1SQ8=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "af66ad14b28a127c5c0f3bbb298218fc63528a18", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, "flake-utils": { "inputs": { "systems": "systems" @@ -56,6 +76,7 @@ }, "root": { "inputs": { + "flake-parts": "flake-parts", "flake-utils": "flake-utils", "nix-vm-test": "nix-vm-test", "nixpkgs": "nixpkgs", diff --git a/flake.nix b/flake.nix index 9e2a935..ff3162f 100644 --- a/flake.nix +++ b/flake.nix @@ -3,6 +3,9 @@ nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05"; flake-utils.url = "github:numtide/flake-utils"; + flake-parts.url = "github:hercules-ci/flake-parts"; + flake-parts.inputs.nixpkgs-lib.follows = "nixpkgs"; + nix-vm-test.url = "github:numtide/nix-vm-test"; nix-vm-test.inputs.nixpkgs.follows = "nixpkgs"; nix-vm-test.inputs.flake-utils.follows = "flake-utils"; @@ -23,6 +26,7 @@ nix-vm-test, rust-overlay, treefmt-nix, + flake-parts, ... }@inputs: nixpkgs.lib.foldl (a: b: nixpkgs.lib.recursiveUpdate a b) { } [ @@ -183,7 +187,16 @@ }; checks = - { + import ./tests/integration/integration-checks.nix { + inherit system; + pkgs = inputs.nixpkgs; + lib = nixpkgs.lib; + rosenpassNew = self.packages.${system}.default; + rosenpassOld = + (builtins.getFlake "github:rosenpass/rosenpass?rev=916a9ebb7133f0b22057fb097a473217f261928a") + .packages.${system}.default; + } + // { systemd-rosenpass = pkgs.testers.runNixOSTest ./tests/systemd/rosenpass.nix; systemd-rp = pkgs.testers.runNixOSTest ./tests/systemd/rp.nix; formatting = treefmtEval.config.build.check self;