tercul-backend/Makefile
google-labs-jules[bot] 9a2c77a5ca feat: Establish CI/CD Pipeline with Makefile
This commit introduces a `Makefile` to standardize the build, test, and linting process, as suggested in the `TODO.md` file.

The `Makefile` includes targets for `lint`, `test`, and `test-integration`.

The `.github/workflows/ci.yml` file has been updated to use the `make test-integration` target, simplifying the CI configuration.

The `.github/workflows/cd.yml` file has been updated to be ready for deployment to a staging environment. It now calls a `make deploy-staging` target, which serves as a placeholder for the actual deployment script.

This work addresses the 'Establish a CI/CD Pipeline' task from the `TODO.md`.
2025-09-07 21:20:47 +00:00

27 lines
871 B
Makefile

.PHONY: lint test test-integration
##@ General
help: ## Display this help.
@awk 'BEGIN {FS = ":.*##"; printf "\\nUsage:\\n make \\033[36m<target>\\033[0m\\n\\nTargets:\\n"} /^[a-zA-Z_0-9-]+:.*?##/ { printf " \\033[36m%-15s\\033[0m %s\\n", $$1, $$2 }' $(MAKEFILE_LIST)
##@ Development
lint: ## Lint the codebase.
@echo "Running linter..."
@golangci-lint run
test: ## Run unit tests.
@echo "Running unit tests..."
@go test -v -race -short ./...
test-integration: ## Run integration tests.
@echo "Running integration tests..."
@go test -v -race -coverprofile=coverage.txt -covermode=atomic ./...
##@ Deployment
deploy-staging: ## Deploy to the staging environment.
@echo "Deploying to staging..."
@echo "This is a placeholder. Add your deployment script here."
@echo "You will likely need to configure secrets in your CI/CD environment for this to work."