A flake checker (treefmt & nix-unit) for testing other flakes with zero dependencies.
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

more docs

+5 -23
+1
.github/workflows/test.yml
··· 10 10 - uses: actions/checkout@v4 11 11 - uses: cachix/install-nix-action@v30 12 12 - run: nix run -L .#treefmt -- --ci $PWD 13 + - run: nix flake check -L --override-input target path:$PWD/templates/default 13 14 - run: nix flake check -L --override-input target path:$PWD/example 14 15 - run: | 15 16 nix flake check -L --override-input target path:$PWD/failing-example || touch did-failed
+4 -23
README.md
··· 6 6 7 7 - nix-unit - The flake being checked (ie, `inputs.target`) is expected to expose `flakeModules.checkmate`: 8 8 9 - ```nix 10 - # Example 11 - flakeModules.checkmate = 12 - { inputs, ... }: 13 - let 14 - self = inputs.target; # your flake being tested 15 - some-dep = self.inputs.some-dep; # access your flake dependencies via the target. 16 - in 17 - { 18 - perSystem = ( 19 - { lib, pkgs, ... }: 20 - { 21 - nix-unit.tests = { 22 - "test lib works" = { 23 - expr = lib.removeSuffix ".nix" "hello.nix"; 24 - expected = "hello"; 25 - }; 26 - }; 9 + > See [import-tree](https://github.com/vic/import-tree/blob/main/checks/checkmate.nix) or [example](https://github.com/vic/checkmate/blob/main/example/checkmate.nix) 27 10 28 - # add any other derivations to check 29 - # checks.<name> = <derivation>; 30 - } 31 - ); 32 - }; 11 + ```shell 12 + # Generate a new project including github CI action 13 + nix flake new -t github:vic/checkmate 33 14 ``` 34 15 35 16 ### Running treefmt on your code