mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-09 19:13:26 +03:00
lib/tests: avoid full rebuild when only maintainers change
The vast majority of CI jobs to build the lib tests are caused by changes in the maintainer list. In this case, we currently run the full test-suite which takes 3-4 minutes. By moving the maintainers and teams tests out of the test-with-nix file, we save almost all of that. Building only those two tests on a change is almost instant. This only works, because we previously enabled cachix for the workflow. Note, that these tests are not actually run with both nix versions, even though they were listed in the "test with specific nix version" file. That's because we only differ in the nix version run *inside* the sandbox, but not doing the outer build. Since this file seems to be re-used by NixOS/nix' CI, this is technically a small loss in coverage for that repo, but nixpkgs CI considerations outweigh that. But because of this, I left the other non-nix-version-specific tests in that file.
This commit is contained in:
parent
f87dac4be3
commit
a7f4e0f9ae
3 changed files with 11 additions and 10 deletions
|
@ -54,7 +54,7 @@ let
|
|||
|
||||
missingGithubIds = lib.concatLists (lib.mapAttrsToList checkMaintainer lib.maintainers);
|
||||
|
||||
success = pkgs.runCommand "checked-maintainers-success" { } ">$out";
|
||||
success = pkgs.runCommand "checked-maintainers-success" { } "mkdir $out";
|
||||
|
||||
failure =
|
||||
pkgs.runCommand "checked-maintainers-failure"
|
||||
|
|
|
@ -28,5 +28,14 @@ let
|
|||
in
|
||||
pkgsBB.symlinkJoin {
|
||||
name = "nixpkgs-lib-tests";
|
||||
paths = map testWithNix nixVersions;
|
||||
paths = map testWithNix nixVersions ++ [
|
||||
(import ./maintainers.nix {
|
||||
inherit pkgs;
|
||||
lib = import ../.;
|
||||
})
|
||||
(import ./teams.nix {
|
||||
inherit pkgs;
|
||||
lib = import ../.;
|
||||
})
|
||||
];
|
||||
}
|
||||
|
|
|
@ -19,14 +19,6 @@ pkgs.runCommand "nixpkgs-lib-tests-nix-${nix.version}"
|
|||
buildInputs = [
|
||||
(import ./check-eval.nix)
|
||||
(import ./fetchers.nix)
|
||||
(import ./maintainers.nix {
|
||||
inherit pkgs;
|
||||
lib = import ../.;
|
||||
})
|
||||
(import ./teams.nix {
|
||||
inherit pkgs;
|
||||
lib = import ../.;
|
||||
})
|
||||
(import ../path/tests {
|
||||
inherit pkgs;
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue