add test target

This commit is contained in:
Balakrishnan Balasubramanian 2024-04-04 21:03:27 -04:00
parent e853cfe62d
commit 1d644a9bcc

View File

@ -1,6 +1,5 @@
# Needs python3 >= 3.9, sed, git for build, docker for tests
.PHONY: build
build: clean
# Needs python3 >= 3.9, sed, git for build
mail4one.pyz: requirements.txt mail4one/*py
python3 -m pip install -r requirements.txt --no-compile --target build
cp -r mail4one/ build/
sed -i "s/DEVELOMENT/$(shell scripts/get_version.sh)/" build/mail4one/version.py
@ -14,6 +13,13 @@ build: clean
--main mail4one.server:main \
--compress build
.PHONY: build
build: clean mail4one.pyz
.PHONY: test
test: mail4one.pyz
PYTHONPATH=mail4one.pyz python3 -m unittest discover
.PHONY: clean
clean:
rm -rf build
@ -59,6 +65,6 @@ update:
shell:
MYPYPATH=$(shell ls -d `pipenv --venv`/lib/python3*/site-packages) pipenv shell
.PHONY: test
test:
.PHONY: dev-test
dev-test:
pipenv run python -m unittest discover