Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: put (back) plugins tests in a single linkFarm #2015

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 33 additions & 33 deletions flake-modules/tests.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,44 +10,44 @@
...
}:
{
checks =
{
extra-args-tests = import ../tests/extra-args.nix {
inherit pkgs;
inherit makeNixvimWithModule;
};

extend = import ../tests/extend.nix { inherit pkgs makeNixvimWithModule; };

extra-files = import ../tests/extra-files.nix { inherit pkgs makeNixvimWithModule; };

enable-except-in-tests = import ../tests/enable-except-in-tests.nix {
inherit pkgs makeNixvimWithModule;
inherit (self.lib.${system}.check) mkTestDerivationFromNixvimModule;
};

no-flake = import ../tests/no-flake.nix {
inherit system;
inherit (self.lib.${system}.check) mkTestDerivationFromNvim;
nixvim = "${self}";
};

lib-tests = import ../tests/lib-tests.nix {
inherit pkgs helpers;
inherit (pkgs) lib;
};

maintainers = import ../tests/maintainers.nix { inherit pkgs; };

generated = pkgs.callPackage ../tests/generated.nix { };
}
// (import ../tests {
checks = {
extra-args-tests = import ../tests/extra-args.nix {
inherit pkgs;
inherit makeNixvimWithModule;
};

extend = import ../tests/extend.nix { inherit pkgs makeNixvimWithModule; };

extra-files = import ../tests/extra-files.nix { inherit pkgs makeNixvimWithModule; };

enable-except-in-tests = import ../tests/enable-except-in-tests.nix {
inherit pkgs makeNixvimWithModule;
inherit (self.lib.${system}.check) mkTestDerivationFromNixvimModule;
};

no-flake = import ../tests/no-flake.nix {
inherit system;
inherit (self.lib.${system}.check) mkTestDerivationFromNvim;
nixvim = "${self}";
};

lib-tests = import ../tests/lib-tests.nix {
inherit pkgs helpers;
inherit (pkgs) lib;
};

maintainers = import ../tests/maintainers.nix { inherit pkgs; };

generated = pkgs.callPackage ../tests/generated.nix { };

tests = import ../tests {
inherit
pkgs
pkgsUnfree
helpers
makeNixvimWithModule
;
});
};
};
};
}
17 changes: 8 additions & 9 deletions tests/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,9 @@ let
}
];
};
in
# We attempt to build & execute all configurations
builtins.listToAttrs (
builtins.map (

# We attempt to build & execute all configurations
derivationList = builtins.map (
{ name, cases }:

let
Expand All @@ -48,9 +47,8 @@ builtins.listToAttrs (
dontRunModule = case: case.tests.dontRun or false;
in
{
name = "test-${name}";
value = mkTestDerivationFromNixvimModule {
inherit name;
inherit name;
path = mkTestDerivationFromNixvimModule {
tests = builtins.map (
{ name, case }:
{
Expand All @@ -64,5 +62,6 @@ builtins.listToAttrs (
pkgs = pkgsUnfree;
};
}
) (testFiles ++ [ exampleFiles ])
)
) (testFiles ++ [ exampleFiles ]);
in
pkgs.linkFarm "nixvim-tests" derivationList