.PHONY: test-unit test-integration build-prod verify-prod build-ui-prod verify-ui-prod validate-k8s

test-unit:
	cd api && python -m pytest tests/unit/ -v

test-integration:
	docker compose -f docker-compose.test.yml build api-test
	docker compose -f docker-compose.test.yml run --rm api-test

build-prod:
	docker build -f api/Dockerfile.prod api/ -t reactbin-api-prod:latest

verify-prod:
	bash api/tests/build/verify_production_image.sh

build-ui-prod:
	docker build -f ui/Dockerfile.prod ui/ -t reactbin-ui-prod:latest

verify-ui-prod:
	bash ui/tests/build/verify_production_image.sh

# Offline: yamllint only. Online (requires kubeconfig): kubectl apply --dry-run=client -f k8s/
validate-k8s:
	yamllint -d relaxed k8s/
	kubectl apply --dry-run=client -f k8s/
