setup_venv:
	python3 -m venv venv

lint:
	flake8 src

clean_html_report:
	rm -r html_report || true
	mkdir "html_report"

run_tests:
	py.test

# Set the LAMBDA_DIR env variable to the name of the lambda to test
# e.g ar_to_ddb_sync
run_lambda_tests:
	pytest --report=html_report/report.html --template=html1/index.html -s --rootdir=src src/tests/lambda/*/test_$${LAMBDA_DIR}.py

run_state_machine_tests:
	pytest --report=html_report/report.html --template=html1/index.html -s --rootdir=src src/tests/state_machine/test_$${STATE_MACHINE}.py

docker_run_lambda_tests: clean_html_report
	./scripts/run_tests_in_docker.sh
