Skip to content

Commit

Permalink
Try checking CI var earlier
Browse files Browse the repository at this point in the history
  • Loading branch information
RebeccaMahany committed Jan 19, 2024
1 parent d12e6cc commit b697da2
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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; });
};
}
4 changes: 0 additions & 4 deletions tests/kolide-launcher.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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"):
Expand Down

0 comments on commit b697da2

Please sign in to comment.