diff options
| author | Theofilos Augoustis <theofilos.augoustis@gmail.com> | 2025-09-10 10:29:10 +0000 |
|---|---|---|
| committer | Theofilos Augoustis <theofilos.augoustis@gmail.com> | 2025-09-10 10:29:10 +0000 |
| commit | b90c46e2777ffec89c1fdbd8ded150fcc9ed4084 (patch) | |
| tree | 60348e73e4b3a08a89d374684561c6ed5654d82d /flake.nix | |
| parent | aafb69e4d91b79fa5a8a3c31dd1004edb66af0bd (diff) | |
| download | focaccia-b90c46e2777ffec89c1fdbd8ded150fcc9ed4084.tar.gz focaccia-b90c46e2777ffec89c1fdbd8ded150fcc9ed4084.zip | |
Add support for running tests with flake check
Diffstat (limited to 'flake.nix')
| -rw-r--r-- | flake.nix | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/flake.nix b/flake.nix index 8150a57..4141100 100644 --- a/flake.nix +++ b/flake.nix @@ -302,6 +302,28 @@ shellHook = uvShellHook; }; }; + + checks = { + focaccia-tests = pkgs.stdenv.mkDerivation { + name = "focaccia-tests"; + src = ./.; + + doCheck = true; + dontBuild = true; + + nativeCheckInputs = [ packages.dev pythonDevEnv ]; + + checkPhase = '' + set -euo pipefail + export REPO_ROOT="$PWD" + ${packages.dev}/bin/python -m 'pytest' -q tests + touch $out + ''; + + env = uvEnv; + shellHook = uvShellHook; + }; + }; }); } |