From b697da2037c0df34d21105aeff7c5f2636d6f0cd Mon Sep 17 00:00:00 2001 From: Rebecca Mahany-Horton Date: Fri, 19 Jan 2024 12:55:19 -0500 Subject: [PATCH] Try checking CI var earlier --- .github/workflows/validate.yml | 2 +- flake.nix | 2 +- tests/kolide-launcher.nix | 4 ---- 3 files changed, 2 insertions(+), 6 deletions(-) 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..78d9130 100644 --- a/flake.nix +++ b/flake.nix @@ -52,6 +52,6 @@ nixosModules.kolide-launcher = import ./modules/kolide-launcher self; - checks.x86_64-linux.kolide-launcher = import ./tests/kolide-launcher.nix { flake = self; }; + checks.x86_64-linux.kolide-launcher = lib.mkIf (builtins.getEnv "CI" == "1") (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"):