.PHONY: lint test test-unit clean up lint-and-test
	
env: requirements.txt requirements-dev.txt
	python -m venv env
	env/bin/pip install --upgrade pip
	env/bin/pip install -r requirements.txt
	env/bin/pip install -r requirements-dev.txt

lint: env tests
	env/bin/flake8 index.py config.py tests/integration

test:
	env/bin/python -m pytest tests/integration -v -s

test-unit: env
	env/bin/python -m pytest tests/unit -v -s

clean:
	rm -rf env

up: # Compose docker app
	docker compose up --build cypher-scheduler

lint-and-test:
	docker compose up \
			--build lint-and-test \
			--exit-code-from lint-and-test \
			--remove-orphans lint-and-test
