group tests by type
This commit is contained in:
parent
805b008c79
commit
4b9e0ad173
2 changed files with 31 additions and 19 deletions
10
README.md
10
README.md
|
@ -686,8 +686,16 @@ Come hang out in the [Matrix channel](https://matrix.to/#/%23selfhostblocks%3Ama
|
||||||
|
|
||||||
### Run tests
|
### Run tests
|
||||||
|
|
||||||
|
Run all tests:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ nix flake check
|
$ nix build .#checks.${system}.all
|
||||||
|
```
|
||||||
|
|
||||||
|
Run one group of tests:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ nix build .#checks.${system}.module
|
||||||
```
|
```
|
||||||
|
|
||||||
### Deploy using colmena
|
### Deploy using colmena
|
||||||
|
|
40
flake.nix
40
flake.nix
|
@ -36,26 +36,30 @@
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
checks = {
|
checks =
|
||||||
tests = nix-flake-tests.lib.check {
|
let
|
||||||
inherit pkgs;
|
importFiles = files:
|
||||||
tests =
|
map (m: import m {
|
||||||
let
|
inherit pkgs;
|
||||||
importFiles = files:
|
inherit (pkgs) lib;
|
||||||
map (m: import m {
|
}) files;
|
||||||
inherit pkgs;
|
|
||||||
inherit (pkgs) lib;
|
|
||||||
}) files;
|
|
||||||
|
|
||||||
mergeTests = pkgs.lib.lists.foldl pkgs.lib.trivial.mergeAttrs {};
|
mergeTests = pkgs.lib.lists.foldl pkgs.lib.trivial.mergeAttrs {};
|
||||||
in mergeTests (importFiles [
|
in rec {
|
||||||
./test/modules/arr.nix
|
all = mergeTests [
|
||||||
./test/modules/davfs.nix
|
modules
|
||||||
./test/modules/postgresql.nix
|
];
|
||||||
]);
|
|
||||||
|
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
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue