1
0
Fork 0

group tests by type

This commit is contained in:
Pierre Penninckx 2023-11-21 22:18:48 -08:00 committed by GitHub
parent 805b008c79
commit 4b9e0ad173
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 31 additions and 19 deletions

View file

@ -686,8 +686,16 @@ Come hang out in the [Matrix channel](https://matrix.to/#/%23selfhostblocks%3Ama
### Run tests
Run all tests:
```bash
$ nix flake check
$ nix build .#checks.${system}.all
```
Run one group of tests:
```bash
$ nix build .#checks.${system}.module
```
### Deploy using colmena

View file

@ -36,26 +36,30 @@
];
};
checks = {
tests = nix-flake-tests.lib.check {
inherit pkgs;
tests =
let
importFiles = files:
map (m: import m {
inherit pkgs;
inherit (pkgs) lib;
}) files;
checks =
let
importFiles = files:
map (m: import m {
inherit pkgs;
inherit (pkgs) lib;
}) files;
mergeTests = pkgs.lib.lists.foldl pkgs.lib.trivial.mergeAttrs {};
in mergeTests (importFiles [
./test/modules/arr.nix
./test/modules/davfs.nix
./test/modules/postgresql.nix
]);
mergeTests = pkgs.lib.lists.foldl pkgs.lib.trivial.mergeAttrs {};
in rec {
all = mergeTests [
modules
];
modules = nix-flake-tests.lib.check {
inherit pkgs;
tests =
mergeTests (importFiles [
./test/modules/arr.nix
./test/modules/davfs.nix
./test/modules/postgresql.nix
]);
};
};
};
# templates.default = {}; Would be nice to have a template
}
);
}