.PHONY: pip_dev lint test run clean

env pip_dev: requirements.txt requirements-dev.txt
	python3.6 -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: auth0_sync_env/ tests/
	env/bin/flake8 auth0_sync_env/ tests/

test: tests/
	env/bin/pytest -v tests/ \
		--cov-config .coveragerc \
		--cov ./ \
		--cov-report xml \
		--junitxml=pyunit.xml

html_coverage: tests/
	rm -rf htmlcov
	env/bin/pytest -v tests/ \
		--cov-config .coveragerc \
		--cov ./ \
		--cov-report html

dev run:
	env/bin/python run.py
