.PHONY: test test-unit integration-up integration-test integration-down build check

test:
	pytest

test-unit:
	pytest tests/unit tests/plugin -q

integration-up:
	docker compose -f docker-compose.integration.yml up -d

integration-test:
	PKCT_RUN_INTEGRATION=1 \
	PKCT_BOOTSTRAP_SERVERS=localhost:19092 \
	PKCT_SCHEMA_REGISTRY_URL=http://localhost:8081 \
	pytest tests/integration -q -s

integration-down:
	docker compose -f docker-compose.integration.yml down -v

check:
	ruff check .
	mypy src
	pytest

build:
	rm -rf dist build *.egg-info src/*.egg-info
	python3 -m build
	python3 -m twine check dist/*
