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

dev:
	pipenv run python dev.py

lint:
	pipenv run flake8 analytics/ tests/

# Install all dependencies (including dev) as pinned in Pipfile.lock
pip_dev:
	pipenv install --dev --ignore-pipfile

# Update Pipfile.lock and install all dependencies (including dev)
install_with_dev:
	pipenv --rm install --dev

test:
	pipenv run py.test tests/unit/

test_unit:
	pipenv run py.test \
		--ignore=tests/integration/load \
		--ignore=tests/integration/test_api.py \
		--ignore=tests/integration/models/test_geographics.py \
		--cov analytics tests \
		--cov-report xml \
		--junitxml=../build/pyunit.xml

test_integration:
	./scripts/test_integration.sh

test_load:
	pipenv run bzt tests/integration/load/test.yml
