just: test specific service (#101)

This commit is contained in:
Shivaraj B H 2024-02-19 11:12:43 +05:30 committed by GitHub
parent 76beca31cc
commit 29781d10d0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 14 additions and 2 deletions

2
.gitignore vendored
View File

@ -1 +1,3 @@
.direnv
# created when `just test <service>` is used
/result

View File

@ -27,6 +27,11 @@
inputsFrom = [
config.treefmt.build.devShell
];
shellHook = ''
echo
echo "🍎🍎 Run 'just <recipe>' to get started"
just
'';
};
};
};

View File

@ -9,6 +9,11 @@ ex:
fmt:
treefmt
# Run native tests
test:
# Run native tests for all the services
test-all:
nix flake check test/ --override-input services-flake . -L
# `nix flake check` doesn't support individual checks: https://github.com/NixOS/nix/issues/8881
# Run native test for a specific service
test service:
nix build ./test#checks.$(nix eval --impure --expr "builtins.currentSystem").{{service}} --override-input services-flake . -L