From 3e218fd3aa6d9f54ab27ff4c041fd1bda16026a0 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..6baa59f 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 = 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"):