.PHONY: help test lint clean build run

help:
	@echo "Available targets:"
	@echo "  test    - Run tests with coverage"
	@echo "  lint    - Run linting checks"
	@echo "  clean   - Clean up build artifacts"
	@echo "  build   - Build Docker image"
	@echo "  run     - Run Docker container"

test:
	uv run pytest tests/ -v --cov=src --cov-report=term-missing

lint:
	uv run ruff check .
	uv run ruff format --check .

format:
	uv run ruff format .

clean:
	rm -rf .pytest_cache
	rm -rf .ruff_cache
	rm -rf __pycache__
	find . -type d -name __pycache__ -exec rm -rf {} +
	find . -type f -name "*.pyc" -delete

build:
	docker build -t jira-webhook-authorizer:latest .

run:
	docker run -p 9000:8080 jira-webhook-authorizer:latest
