Loading nixos/modules/services/continuous-integration/github-runner/service.nix +4 −2 Original line number Diff line number Diff line Loading @@ -19,7 +19,9 @@ with lib; ]) ); config.systemd.services = flip mapAttrs' config.services.github-runners (name: cfg: config.systemd.services = let enabledRunners = filterAttrs (_: cfg: cfg.enable) config.services.github-runners; in (flip mapAttrs' enabledRunners (name: cfg: let svcName = "github-runner-${name}"; systemdDir = "github-runner/${name}"; Loading Loading @@ -296,5 +298,5 @@ with lib; cfg.serviceOverrides ]; } ); )); } nixos/tests/github-runner.nix +8 −0 Original line number Diff line number Diff line Loading @@ -11,6 +11,12 @@ import ./make-test-python.nix ({ pkgs, ... }: tokenFile = builtins.toFile "github-runner.token" "not-so-secret"; }; services.github-runners.test-disabled = { enable = false; url = "https://github.com/yaxitech"; tokenFile = builtins.toFile "github-runner.token" "not-so-secret"; }; systemd.services.dummy-github-com = { wantedBy = [ "multi-user.target" ]; before = [ "github-runner-test.service" ]; Loading @@ -33,5 +39,7 @@ import ./make-test-python.nix ({ pkgs, ... }: assert "Self-hosted runner registration" in out, "did not read runner registration header" machine.wait_until_succeeds("test -f /tmp/registration-connect") machine.fail("systemctl list-unit-files | grep test-disabled") ''; }) Loading
nixos/modules/services/continuous-integration/github-runner/service.nix +4 −2 Original line number Diff line number Diff line Loading @@ -19,7 +19,9 @@ with lib; ]) ); config.systemd.services = flip mapAttrs' config.services.github-runners (name: cfg: config.systemd.services = let enabledRunners = filterAttrs (_: cfg: cfg.enable) config.services.github-runners; in (flip mapAttrs' enabledRunners (name: cfg: let svcName = "github-runner-${name}"; systemdDir = "github-runner/${name}"; Loading Loading @@ -296,5 +298,5 @@ with lib; cfg.serviceOverrides ]; } ); )); }
nixos/tests/github-runner.nix +8 −0 Original line number Diff line number Diff line Loading @@ -11,6 +11,12 @@ import ./make-test-python.nix ({ pkgs, ... }: tokenFile = builtins.toFile "github-runner.token" "not-so-secret"; }; services.github-runners.test-disabled = { enable = false; url = "https://github.com/yaxitech"; tokenFile = builtins.toFile "github-runner.token" "not-so-secret"; }; systemd.services.dummy-github-com = { wantedBy = [ "multi-user.target" ]; before = [ "github-runner-test.service" ]; Loading @@ -33,5 +39,7 @@ import ./make-test-python.nix ({ pkgs, ... }: assert "Self-hosted runner registration" in out, "did not read runner registration header" machine.wait_until_succeeds("test -f /tmp/registration-connect") machine.fail("systemctl list-unit-files | grep test-disabled") ''; })