-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathMakefile
More file actions
42 lines (34 loc) · 785 Bytes
/
Makefile
File metadata and controls
42 lines (34 loc) · 785 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
.PHONY: dev
dev: export LOCAL_ENV = 1
dev:
go run cmd/api_gen/*.go
.PHONY: init
init: bootstrap
direnv allow
cp ./scripts/pre-commit .git/hooks/
.PHONY: bootstrap
bootstrap:
# Installed in ./bin
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.45.0
GOBIN=${PWD}/bin go install github.com/swaggo/swag/cmd/swag@v1.7.4
.PHONY: test
test:
go test ./... -v
.PHONY: e2e
e2e: api_gen
cd e2e && \
npm ci && \
dart pub get && \
go test -v ./...
.PHONY: api_gen
api_gen:
go build -o ./bin/api_gen ./cmd/api_gen
.PHONY: gen_samples
gen_samples: api_gen gen_e2e
bash ./samples/generate.sh
.PHONY: gen_e2e
gen_e2e:
cd e2e && E2E_API_GENERATE_ONLY=1 go test .
.PHONY: lint
lint:
golangci-lint run --config .github/.golangci.yml