aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: 98c4805a8eac77b64f9c580eee719e9c914988de (plain)
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
.PHONY: build run test test-race vet lint clean

BINARY=thoi
DATA_DIR=$(PWD)/data

build:
	go build -o $(BINARY) ./cmd/thoi

run: build
	DATA_DIR=$(DATA_DIR) ./$(BINARY)

test:
	DATA_DIR=$(DATA_DIR) go test ./... -timeout 60s

# Race suite: the concurrency tests are only meaningful with -race.
test-race:
	DATA_DIR=$(DATA_DIR) go test -race ./... -timeout 300s

vet:
	go vet ./...

# Requires golangci-lint (v2 config in .golangci.yml):
#   go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@latest
lint:
	golangci-lint run

clean:
	rm -f $(BINARY)