version: '3' tasks: test: desc: Run all tests cmds: - go test ./... test-verbose: desc: Run all tests with verbose output cmds: - go test -v ./... test-coverage: desc: Run tests with coverage report cmds: - go test -cover ./... test-coverage-html: desc: Generate HTML coverage report cmds: - go test -coverprofile=coverage.out ./... - go tool cover -html=coverage.out -o coverage.html - echo Coverage report generated at coverage.html test-race: desc: Run tests with race detection cmds: - go test -race ./... test-bench: desc: Run benchmarks cmds: - go test -bench=. ./... test-pow: desc: Run only PoW package tests cmds: - go test -v ./internal/pow/... build: desc: Build all packages cmds: - go build ./... clean: desc: Clean build artifacts and test cache cmds: - go clean -cache - go clean -testcache - rm -f coverage.out coverage.html lint: desc: Run linter (if available) cmds: - | if command -v golangci-lint >/dev/null 2>&1; then golangci-lint run else echo "golangci-lint not installed, skipping lint" fi fmt: desc: Format Go code cmds: - go fmt ./... mod: desc: Tidy and verify go modules cmds: - go mod tidy - go mod verify mocks: desc: Generate mocks using mockery cmds: - go run github.com/vektra/mockery/v2@latest check: desc: Run all checks (fmt, build, test, lint) deps: [fmt, build, test, lint] dev: desc: Development workflow - format, build and test deps: [fmt, build, test] cpu-burner: desc: Run the CPU burner to stress test PoW solver cmds: - go run ./cmd/cpu-burner burn: desc: Alias for cpu-burner cmds: - task: cpu-burner server: desc: Build and run the server cmds: - go build -o hash-of-wisdom ./cmd/server - ./hash-of-wisdom {{.CLI_ARGS}} server-config: desc: Build and run the server with custom config cmds: - go build -o hash-of-wisdom ./cmd/server - ./hash-of-wisdom -config {{.CONFIG | default "config.yaml"}} client: desc: Build and run the client cmds: - go build -o client ./cmd/client - ./client {{.CLI_ARGS | default "-addr localhost:8080"}} docker-build: desc: Build Docker image cmds: - docker build -t hash-of-wisdom . docker-run: desc: Run Docker container cmds: - docker run -p 8080:8080 -p 8081:8081 hash-of-wisdom metrics: desc: Check metrics endpoint cmds: - curl -s http://localhost:8081/metrics integration: desc: Run integration tests only cmds: - go test -v ./test/integration/...