-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTaskfile.yml
35 lines (29 loc) · 1.01 KB
/
Taskfile.yml
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
tasks:
build:
desc: Build the app
cmds:
- GOFLAGS=-mod=mod go build -o bin/brahmrishi main.go
run:
desc: Run the app
cmds:
- GOFLAGS=-mod=mod go run main.go
generate:
desc: Generate Go code from protobuf
cmds:
- protoc --go_out=plugins=grpc:. --go_opt=paths=source_relative pkg/api/v1/brahmrishi.proto
test:
desc: Execute Unit Tests
cmds:
- gotestsum --junitfile test-results/unit-tests.xml -- -short -race -cover -coverprofile test-results/cover.out ./...
swagger.gen:
desc: Generate Go code
cmds:
- GOFLAGS=-mod=mod go generate github.com/shashi-rai/brahmrishi/internal github.com/shashi-rai/brahmrishi/pkg/swagger
swagger.validate:
desc: Validate swagger
cmds:
- swagger validate pkg/swagger/swagger.yml
swagger.doc:
desc: Doc for swagger
cmds:
- docker run -i yousan/swagger-yaml-to-html < pkg/swagger/swagger.yml > doc/index.html