build: add Makefile for build tasks
Signed-off-by: Tom Carrio <tom@carrio.dev>
This commit is contained in:
parent
a18481c75e
commit
34d7892d54
|
|
@ -0,0 +1,23 @@
|
|||
VENV = . .venv/bin/activate
|
||||
|
||||
.venv: requirements-dev.txt
|
||||
test -d .venv || python -m virtualenv .venv
|
||||
$(VENV); pip install -Ur requirements-dev.txt
|
||||
|
||||
.PHONY: test
|
||||
test: .venv
|
||||
$(VENV); pytest
|
||||
|
||||
.PHONY: lint
|
||||
lint: .venv
|
||||
$(VENV); black .
|
||||
$(VENV); flake8 .
|
||||
$(VENV); isort .
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
@rm -rf .venv
|
||||
@find -iname "*.pyc" -delete
|
||||
|
||||
.PHONY: all
|
||||
all: lint test
|
||||
Loading…
Reference in New Issue