.PHONY: test

test: test-backend test-frontend

.PHONY: test-frontend

test-frontend:
	cd frontend/packages/sxchnge_wallet && flutter test
	cd frontend/packages/sxchnge_kyc && flutter test
	cd frontend/packages/sxchnge_analytics && flutter test
	cd frontend/packages/sxchnge_auth && flutter test
	cd frontend/packages/sxchnge_theme && flutter test
	cd frontend/packages/sxchnge_theme/example && flutter test
	cd frontend/app && flutter test

.PHONY: test-backend lint-backend run-backend

test-backend:
	cd backend/shared && go test -race ./...
	cd backend/product && go test -race ./...

lint-backend:
	cd backend/product && go test ./architecture
	cd backend && test -z "$$(gofmt -l .)"
	cd backend/shared && go vet ./...
	cd backend/product && go vet ./...

run-backend:
	cd backend/product && go run .
