summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorEddy Pedroni <epedroni@pm.me>2024-10-16 22:45:23 +0200
committerEddy Pedroni <epedroni@pm.me>2024-10-16 22:45:23 +0200
commit19aad3fdc3b10312743ff0399a5ad472e6573cad (patch)
treef02a11c5b430e077e45f4ca6d432ef38a6b6b21d /Makefile
parent81949cce8b03703605b2b54d89f37e27617fa0d0 (diff)
Add makefile, pre-commit hook
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile17
1 files changed, 17 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..0f277da
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,17 @@
+test: all
+ ./venv/bin/pytest tests/*
+
+all: venv .git/hooks/pre-commit
+
+clean:
+ rm -rf venv
+
+.git/hooks/pre-commit: pre-commit
+ install -m 755 pre-commit .git/hooks/pre-commit
+
+venv: requirements.txt
+ rm -rf venv
+ python -m venv venv
+ ./venv/bin/pip install -r requirements.txt
+
+.PHONY: all test clean