Makefile updated

This commit is contained in:
Rishat Fayzullin 2024-03-15 17:49:16 +03:00
parent 90b55e39dd
commit e910e04755

View file

@ -8,6 +8,7 @@ code_dir := $(package_dir) $(tests_dir) $(scripts_dir) $(examples_dir)
reports_dir := reports
redis_connection := redis://localhost:6379
mongo_connection := mongodb://mongo:mongo@localhost:27017
# =================================================================================================
# Environment
@ -50,12 +51,12 @@ test-run-services:
.PHONY: test
test: test-run-services
pytest --cov=aiogram --cov-config .coveragerc tests/ --redis $(redis_connection)
pytest --cov=aiogram --cov-config .coveragerc tests/ --redis $(redis_connection) --mongo $(mongo_connection)
.PHONY: test-coverage
test-coverage: test-run-services
mkdir -p $(reports_dir)/tests/
pytest --cov=aiogram --cov-config .coveragerc --html=$(reports_dir)/tests/index.html tests/ --redis $(redis_connection)
pytest --cov=aiogram --cov-config .coveragerc --html=$(reports_dir)/tests/index.html tests/ --redis $(redis_connection) --mongo $(mongo_connection)
coverage html -d $(reports_dir)/coverage
.PHONY: test-coverage-view