-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
52 lines (40 loc) · 886 Bytes
/
Makefile
File metadata and controls
52 lines (40 loc) · 886 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
.PHONY: build test run fmt lint docker up down clean coverage tidy templ
# Generate templ templates
templ:
go tool templ generate
# Build the application
build: templ
go build -o bin/indexer ./cmd/indexer
# Run tests
test:
go test -v ./...
# Run tests with coverage
coverage:
go test -coverprofile=coverage.out ./...
go tool cover -html=coverage.out -o coverage.html
@echo "Coverage report generated: coverage.html"
# Run the application locally
run: templ
go run ./cmd/indexer
# Format code
fmt:
go fmt ./...
# Run linter (requires golangci-lint)
lint:
golangci-lint run
# Tidy dependencies
tidy:
go mod tidy
# Build Docker image
docker:
docker build -t talks-indexer .
# Start all services with docker compose
up:
docker compose up -d
# Stop all services
down:
docker compose down
# Clean build artifacts
clean:
rm -rf bin/
rm -f coverage.out coverage.html