From fed9d08eb8ff39ff015c0fbb45e77b2bebad38da 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 | 4 +++- tests/kolide-launcher.nix | 4 ---- 3 files changed, 4 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..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"):