-
Notifications
You must be signed in to change notification settings - Fork 0
/
Taskfile.yml
70 lines (56 loc) · 1.26 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# https://taskfile.dev/#/installation
version: '3'
silent: true
tasks:
default:
task -l
0:
desc: Stop app in docker-compose
cmds:
- docker-compose down
1:
desc: Run app and database in docker-compose
cmds:
- docker-compose up --build
2:
desc: Format code
cmds:
- task: tidy
- task: fmt
- task: lint
tidy:
cmds:
- echo "Tidy..."
- cd library && GO111MODULE=on go mod tidy && cd ..
fmt:
cmds:
- echo "Fmt..."
- gofmt -w .
lint:
cmds:
- echo "Lint..."
- golangci-lint run
3:
desc: Run testing - unit, integration, coverage
cmds:
- task: test-unit
- task: test-integration
- task: test-coverage
test-unit:
cmds:
- env GO111MODULE=on go test --short -race -coverprofile=cover.out -v ./...
test-integration:
cmds:
- newman run postman/api.postman_collection.json
test-coverage:
cmds:
- env GO111MODULE=on go tool cover -func=cover.out
4:
desc: Benchmarking
cmds:
- env GO111MODULE=on go test -bench=. -cpu=8 -benchmem -cpuprofile=cpu.out -memprofile=mem.out .
5:
desc: Download external modules
cmds:
- echo "Download..."
- GO111MODULE=on go mod download