mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 00:25:42 +02:00
flake/ci: re-enable most tests on buildbot
Most still run on all platforms, but many now only run on x86_64-linux.
This commit is contained in:
parent
74e6ada9d1
commit
7d0ac00557
2 changed files with 19 additions and 2 deletions
|
@ -5,6 +5,7 @@
|
|||
linkFarm,
|
||||
self, # The flake instance
|
||||
system ? pkgs.stdenv.hostPlatform.system,
|
||||
allSystems ? true,
|
||||
}:
|
||||
let
|
||||
autoArgs = pkgs // {
|
||||
|
@ -31,8 +32,15 @@ let
|
|||
callTests = lib.callPackagesWith autoArgs;
|
||||
|
||||
selfPackages = self.packages.${system};
|
||||
|
||||
# For tests that CI should only build on one system,
|
||||
# This is true when on that system.
|
||||
#
|
||||
# TODO: consider refactoring tests/default.nix so that some tests are
|
||||
# defined by it, while others are defined elsewhere...
|
||||
buildForThisSystem = allSystems || system == "x86_64-linux";
|
||||
in
|
||||
{
|
||||
lib.optionalAttrs buildForThisSystem {
|
||||
extra-args-tests = callTest ./extra-args.nix { };
|
||||
extend = callTest ./extend.nix { };
|
||||
extra-files = callTest ./extra-files.nix { };
|
||||
|
@ -47,10 +55,12 @@ in
|
|||
lsp-all-servers = callTest ./lsp-servers.nix { };
|
||||
}
|
||||
# Expose some tests from the docs as flake-checks too
|
||||
// lib.optionalAttrs (selfPackages ? docs) {
|
||||
// lib.optionalAttrs (selfPackages ? docs && buildForThisSystem) {
|
||||
# Individual tests can be run using: nix build .#docs.user-configs.tests.<test>
|
||||
docs-user-configs = linkFarm "user-configs-tests" selfPackages.docs.user-configs.tests;
|
||||
}
|
||||
|
||||
# These are always built on all systems, even when `allSystems = false`
|
||||
// callTests ./platforms { }
|
||||
# Tests generated from ./test-sources
|
||||
# Grouped as a number of link-farms in the form { test-1, test-2, ... test-N }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue