add e2e testing (#167)

Reviewed-on: #167
This commit is contained in:
Henry Hiles 2026-11-10 18:29:02 -05:00 • committed by Henry Hiles
commit af99de75da

View file

@ -54,6 +54,52 @@
};
devShells.default = pkgs.callPackage ./devshell.nix { };
apps =
let
buildEnv = import ./build_env.nix { inherit pkgs lib; };
e2e = pkgs.writeShellApplication {
name = "nexus-e2e";
runtimeInputs =
buildEnv.packages
++ (with pkgs; [
# TEMPORARY: matrix-continuwuity, once the local fixes are released
inputs.continuwuity.packages.${system}.default
curl
dbus
]);
runtimeEnv = buildEnv.env;
text = builtins.readFile ./e2e.sh;
};
in
{
e2e = {
type = "app";
program = lib.getExe e2e;
};
e2e-headless = {
type = "app";
program = lib.getExe (
pkgs.writeShellApplication {
name = "nexus-e2e-headless";
runtimeInputs = [ pkgs.cage ];
runtimeEnv = {
WLR_BACKENDS = "headless";
__EGL_VENDOR_LIBRARY_FILENAMES = "${pkgs.mesa}/share/glvnd/egl_vendor.d/50_mesa.json";
};
text = ''
unset DISPLAY WAYLAND_DISPLAY
# Wayland needs one, which CI may not have
XDG_RUNTIME_DIR="''${XDG_RUNTIME_DIR:-$(mktemp -d)}"
export XDG_RUNTIME_DIR
exec cage -- ${lib.getExe e2e} "$@"
'';
}
);
};
};
};
flake.nixosModules.default = import ./module.nix self;