# Add any tasks that are not dependent on files to the .PHONY list.
.PHONY: dev pip_dev lint test test_unit test_integration

dev:
	python dev.py

pip_dev:
	pip install --upgrade pip setuptools
	pip install -r requirements.txt
	pip install -r requirements-dev.txt

lint:
	flake8 vector_job_rules/ tests/ application.py dev.py
	black -S --check vector_job_rules/ tests/ application.py dev.py

test:
	py.test tests/unit/

test_unit:
	py.test \
		--cov vector_job_rules tests/unit/ \
		--cov-report xml \
		--junitxml=pyunit.xml

test_integration:
	py.test tests/

docker_test_integration:
	docker compose up \
		--build \
		--exit-code-from test-integration \
		--abort-on-container-exit \
		--remove-orphans \
		test-integration

