-
Notifications
You must be signed in to change notification settings - Fork 2
/
Taskfile.yml
46 lines (39 loc) · 1.02 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
version: 3
tasks:
lint:
cmds:
- golangci-lint run ./...
lint:staged:
cmds:
- git diff --cached > /tmp/stage.patch
- defer: rm /tmp/stage.patch
- golangci-lint run --new-from-patch=/tmp/stage.patch
test:
cmds:
- go test -v `go list ./... | grep -v -e './examples' -e './test'` --cover
test:report:
cmds:
- go test -v `go list ./... | grep -v -e './examples' -e './test'` --coverprofile=coverage.out
- go tool cover -html=coverage.out -o coverage.html
run:example:base:
cmds:
- go run main.go serve
dir: examples/base
run:example:react:
cmds:
- cd ./tg_webapp
- npm i
- npm run build
- cd ..
- go run main.go serve
dir: examples/webapp-react
run:test-server:
cmds:
- go run main.go serve
dir: test
# Generate docs
# Require gomarkdoc (https://github.com/princjef/gomarkdoc)
docs:
cmds:
- go install github.com/princjef/gomarkdoc/cmd/gomarkdoc@latest
- gomarkdoc -o README.md -e .