Files
papi-py/Makefile
stephen schuresko 3fa2504c82
All checks were successful
Build and Push to Private Registry101 / build (push) Successful in 7s
fix: update coverage command to include tests for posts and users
2025-02-17 20:57:03 -05:00

20 lines
615 B
Makefile

ENV=dev
VER=2
TAG=${ENV}-${VER}
REGISTRY=kube-reg.fairfaxmedia.net
SVC=papi/svc1
DOCK_IMG=${REGISTRY}/${SVC}:${TAG}
clean:
rm -rf .pytest_cache
rm -rf .coverage
rm -rf report.xml
rm -rf test.db
rm -rf htmlcov
coverage: clean
pytest --cov=papi --cov=posts --cov=users test_papi.py test_posts.py test_users.py --junitxml=report.xml --cov-report=html --cov-report=xml --cov-report=term --cov-fail-under 90
docker-img: coverage
docker build -t ${DOCK_IMG} .
docker-push: docker-img
docker push ${DOCK_IMG}
deploy: docker-push
helm upgrade papi ./papi-helm/ -f ./papi-helm/v.${ENV}.yaml --set image.tag=${TAG}