diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 4f5a6cf..e6e6b97 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -33,7 +33,7 @@ jobs: run: NIXPKGS_ALLOW_UNFREE=1 nix flake check --impure --log-format internal-json timeout-minutes: 15 env: - CI: "true" + CI: "1" - name: get test derivation path id: test-derivation diff --git a/flake.nix b/flake.nix index 2e6ac37..c9612f0 100644 --- a/flake.nix +++ b/flake.nix @@ -52,6 +52,8 @@ nixosModules.kolide-launcher = import ./modules/kolide-launcher self; - checks.x86_64-linux.kolide-launcher = import ./tests/kolide-launcher.nix { flake = self; }; + checks = nixpkgs.lib.mkIf (builtins.getEnv "CI" == "1") { + x86_64-linux.kolide-launcher = import ./tests/kolide-launcher.nix { flake = self; }; + }; }; } diff --git a/tests/kolide-launcher.nix b/tests/kolide-launcher.nix index 355b018..67ed646 100644 --- a/tests/kolide-launcher.nix +++ b/tests/kolide-launcher.nix @@ -48,12 +48,8 @@ pkgs.nixosTest { user = nodes.machine.users.users.alice; uid = toString user.uid; xauthority = "${user.home}/.Xauthority"; - ci = builtins.getEnv "CI"; in '' - if not "${ci}": - return - machine.start() with subtest("log in to MATE"):