mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 08:35:43 +02:00
ci/check: group test-N derivations into one drv
This commit is contained in:
parent
f57d629bb0
commit
2431cdc047
1 changed files with 19 additions and 1 deletions
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
lib,
|
||||
self,
|
||||
inputs,
|
||||
helpers,
|
||||
|
@ -15,6 +16,23 @@
|
|||
|
||||
# Output a build matrix for CI
|
||||
flake.githubActions = inputs.nix-github-actions.lib.mkGithubMatrix {
|
||||
inherit (self) checks;
|
||||
checks = builtins.mapAttrs (
|
||||
system:
|
||||
lib.flip lib.pipe [
|
||||
lib.attrsToList
|
||||
# Group the "test-N" tests back into one drv
|
||||
# FIXME: drop the entire test-grouping system
|
||||
(builtins.groupBy ({ name, value }: if lib.strings.hasPrefix "test-" name then "test" else name))
|
||||
(builtins.mapAttrs (
|
||||
group: tests:
|
||||
let
|
||||
pkgs = inputs.nixpkgs.legacyPackages.${system};
|
||||
singleton = (builtins.head tests).value;
|
||||
joined = pkgs.linkFarmFromDrvs group (builtins.listToAttrs tests);
|
||||
in
|
||||
if builtins.length tests > 1 then joined else singleton
|
||||
))
|
||||
]
|
||||
) self.checks;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue