-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
45 lines (32 loc) · 971 Bytes
/
Makefile
File metadata and controls
45 lines (32 loc) · 971 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
GOCACHE ?= /tmp/examora-gocache
.PHONY: help deps infra-up infra-down go-check api worker sandbox fmt lint test check
help:
@echo "Available targets:"
@echo " make deps - install frontend dependencies"
@echo " make infra-up - start postgres and redis"
@echo " make infra-down - stop postgres and redis"
@echo " make go-check - run Go tests"
@echo " make api - run the Go API service"
@echo " make worker - run the Go judge worker"
@echo " make sandbox - run the Go sandbox service"
deps:
pnpm install
infra-up:
docker compose -f deploy/docker-compose.yml up -d
infra-down:
docker compose -f deploy/docker-compose.yml down
go-check:
GOCACHE=$(GOCACHE) go test ./...
api:
GOCACHE=$(GOCACHE) go run ./cmd/api
worker:
GOCACHE=$(GOCACHE) go run ./cmd/worker
sandbox:
GOCACHE=$(GOCACHE) go run ./cmd/sandbox
fmt:
golangci-lint fmt ./...
lint:
golangci-lint run ./...
test:
go test ./...
check: fmt lint test