Skip to content

Commit fc77a26

Browse files
committed
ci: make sure we cache system manager and its test dependencies
1 parent 1e498d8 commit fc77a26

File tree

3 files changed

+15
-8
lines changed

3 files changed

+15
-8
lines changed

ansible/tests/conftest.py

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,18 +59,21 @@ def _run_playbook(playbook_name, verbose=False):
5959
]
6060
if verbose:
6161
cmd.append("-vvv")
62-
cmd.extend([
63-
"-i",
64-
"localhost,",
65-
"--extra-vars",
66-
"@/flake/ansible/vars.yml",
67-
f"/flake/ansible/tests/{playbook_name}",
68-
])
62+
cmd.extend(
63+
[
64+
"-i",
65+
"localhost,",
66+
"--extra-vars",
67+
"@/flake/ansible/vars.yml",
68+
f"/flake/ansible/tests/{playbook_name}",
69+
]
70+
)
6971
result = host.run(" ".join(cmd))
7072
if result.failed:
7173
console.log(result.stdout)
7274
console.log(result.stderr)
7375
raise pytest.fail(
7476
f"Ansible playbook {playbook_name} failed with return code {result.rc}"
7577
)
78+
7679
return _run_playbook

ansible/tests/test_nix.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,6 @@ def run_ansible(run_ansible_playbook):
99
def test_nix_service(host):
1010
assert host.service("nix-daemon.service").is_running
1111

12+
1213
def test_envoy_service(host):
1314
assert host.service("envoy.service").is_running

nix/checks.nix

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,9 @@
315315
inherit self;
316316
inherit pkgs;
317317
})
318-
);
318+
)
319+
// pkgs.lib.optionalAttrs (pkgs.stdenv.hostPlatform.isLinux) {
320+
inherit (self'.packages) ansible-test run-testinfra docker-image-ubuntu;
321+
};
319322
};
320323
}

0 commit comments

Comments
 (0)