From c103da6a19c623e6e5c8c791d8012c29855bb802 Mon Sep 17 00:00:00 2001 From: zowoq <59103226+zowoq@users.noreply.github.com> Date: Fri, 22 May 2026 18:34:16 +1000 Subject: [PATCH] ci: add nixosTests.simple-container nixosTests.simple-vm but using an nspawn container --- ci/eval/compare/default.nix | 4 +++- ci/eval/outpaths.nix | 4 +++- ci/github-script/check-target-branch.js | 1 + 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ci/eval/compare/default.nix b/ci/eval/compare/default.nix index 1e1036e8da9f..e596b6d1994f 100644 --- a/ci/eval/compare/default.nix +++ b/ci/eval/compare/default.nix @@ -172,6 +172,7 @@ let rebuildCountByKernel = lib.mapAttrs ( kernel: kernelRebuilds: lib.length kernelRebuilds ) rebuildsByKernel; + rebuildNames = extractPackageNames diffAttrs.rebuilds; in writeText "changed-paths.json" ( builtins.toJSON { @@ -188,7 +189,8 @@ let kernel: rebuilds: lib.nameValuePair "10.rebuild-${kernel}-stdenv" (lib.elem "stdenv" rebuilds) ) rebuildsByKernel // { - "10.rebuild-nixos-tests" = lib.elem "nixosTests.simple-vm" (extractPackageNames diffAttrs.rebuilds); + "10.rebuild-nixos-tests" = + lib.elem "nixosTests.simple-container" rebuildNames || lib.elem "nixosTests.simple-vm" rebuildNames; }; } ); diff --git a/ci/eval/outpaths.nix b/ci/eval/outpaths.nix index 577ecfc4d18a..afbce48f3321 100755 --- a/ci/eval/outpaths.nix +++ b/ci/eval/outpaths.nix @@ -108,6 +108,8 @@ in tweak ( (removeAttrs nixpkgsJobs blacklist) // { - nixosTests = lib.filterAttrs (name: _: name == "simple-vm") nixosJobs.tests; + nixosTests = lib.filterAttrs ( + name: _: name == "simple-container" || name == "simple-vm" + ) nixosJobs.tests; } ) diff --git a/ci/github-script/check-target-branch.js b/ci/github-script/check-target-branch.js index 8a3dd0456944..01c062d410ab 100644 --- a/ci/github-script/check-target-branch.js +++ b/ci/github-script/check-target-branch.js @@ -99,6 +99,7 @@ async function checkTargetBranch({ github, context, core, dry }) { ...Object.values(changed.rebuildCountByKernel), ) const rebuildsAllTests = + changed.attrdiff.changed.includes('nixosTests.simple-container') || changed.attrdiff.changed.includes('nixosTests.simple-vm') // https://github.com/NixOS/nixpkgs/pull/481205#issuecomment-3790123921