-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yml
More file actions
86 lines (69 loc) · 1.78 KB
/
Taskfile.yml
File metadata and controls
86 lines (69 loc) · 1.78 KB
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
version: "3"
tasks:
fmt:
cmds:
- go fmt ./...
vet:
cmds:
- go vet ./...
lint:
cmds:
- golangci-lint run
tidy:
cmds:
- go mod tidy
test:
vars:
PKGS:
sh: go list ./... | grep -v '/examples' | paste -sd' ' -
cmds:
- go test {{.PKGS}}
cover:
vars:
PKGS:
sh: go list ./... | grep -v '/examples' | paste -sd' ' -
COVERPKG:
sh: go list ./... | grep -v '/examples' | paste -sd, -
cmds:
- go test -count=1 {{.PKGS}} -coverpkg={{.COVERPKG}} -coverprofile=coverage.out -covermode=atomic
- go tool cover -func=coverage.out | tail -n 1
race:
vars:
PKGS:
sh: go list ./... | grep -v '/examples' | paste -sd' ' -
cmds:
- go test -race {{.PKGS}}
ci:
cmds:
- task: fmt
- task: vet
- task: lint
- task: cover
build:
cmds:
- mkdir -p bin
- go build -o bin/hyrouter ./cmd/hyrouter
run:
cmds:
- go run ./cmd/hyrouter -config dev/config.dev.yaml
run:debug:
cmds:
- go run ./cmd/hyrouter -config dev/config.dev.yaml -log-level debug
plugin:grpc:run:
cmds:
- go run -tags=examples ./examples/grpc-plugin -listen 127.0.0.1:7777
plugin:wasm:build:
cmds:
- GOOS=wasip1 GOARCH=wasm go build -tags=examples -buildmode=c-shared -o examples/wasm-plugin/plugin.wasm ./examples/wasm-plugin
run:plugins:
cmds:
- go run ./cmd/hyrouter -config dev/config.plugins.dev.yaml
run:plugins:debug:
cmds:
- go run ./cmd/hyrouter -config dev/config.plugins.dev.yaml -log-level debug
docker:build:
cmds:
- docker build -t hyrouter:local .
docker:run:
cmds:
- docker run --rm -p 5520:5520/udp -v $(pwd)/config.yaml:/app/config.yaml hyrouter:local