summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorBrian Picciano <mediocregopher@gmail.com>2022-05-08 16:36:28 -0600
committerBrian Picciano <mediocregopher@gmail.com>2022-05-08 16:36:28 -0600
commita759fc28f715f4c7523a830314e3ccf09e2f0d70 (patch)
tree7138b26009f4a4dd1ba0ae7d4af1962ee70992fa /Makefile
parentddb126db1709b1c7679b8370b508639991387bf0 (diff)
Add test target to Makefile to run full integration tests
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile33
1 files changed, 11 insertions, 22 deletions
diff --git a/Makefile b/Makefile
index d074a3d..de7e4f1 100644
--- a/Makefile
+++ b/Makefile
@@ -1,34 +1,23 @@
-SKIP_SERVICES = []
-all:
- nix-build -A entrypoint \
- --arg baseConfig '(import ./config.nix)' \
- --arg baseSkipServices '${SKIP_SERVICES}'
-
-run: all
- ./result
+CONFIG = ./config.nix
-all.prod:
+entrypoint:
nix-build -A entrypoint \
- --arg baseConfig '(import ./prod.config.nix)' \
- --arg baseSkipServices '${SKIP_SERVICES}'
+ --arg baseConfig '(import ${CONFIG})'
-run.prod: all.prod
+install:
+ nix-build -A install --arg baseConfig '(import ${CONFIG})'
./result
-install.prod:
- nix-build -A install --arg baseConfig '(import ./prod.config.nix)'
- ./result
+test:
+ $$(nix-build --no-out-link -A pkgs.bash)/bin/bash test.sh
+ @if [ $$? == 0 ]; then echo "TESTS PASSED!"; else echo "TESTS FAILED!"; fi
srv.shell:
- nix-shell -A srv.shell --command 'cd srv; return'
-
-srv.shell.prod:
- nix-shell -A srv.shell --arg baseConfig '(import ./prod.config.nix)' --command 'cd srv; return'
-
-static.shell:
- nix-shell -A static.shell --command 'cd static; return'
+ nix-shell -A srv.shell --arg baseConfig '(import ${CONFIG})' \
+ --command 'cd srv; return'
+# TODO static is on the way out, these aren't well supported
static.serve:
nix-shell -A static.shell --run 'cd static; static-serve'