-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathTaskfile.yaml
34 lines (33 loc) · 1.04 KB
/
Taskfile.yaml
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
version: "3"
tasks:
default:
cmds:
- task: dependency
- task: fmt
- task: check
- task: test
dependency:
cmds:
- go install golang.org/x/tools/cmd/goimports@latest
- go install github.com/daixiang0/gci@latest
- go install github.com/client9/misspell/cmd/misspell@latest
- go install honnef.co/go/tools/cmd/staticcheck@latest
- go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
fmt:
cmds:
- gofmt -s -w -l .
- echo 'goimports' && goimports -w -local github.com/omegaatt36/instagramrobot $(find . -type f -name '*.go')
- gci write -s standard -s default -s "Prefix(github.com/omegaatt36/instagramrobot)" --skip-generated .
- go mod tidy
check:
cmds:
- go vet -all ./...
- golangci-lint run
- misspell -error */**
- echo 'staticcheck' && staticcheck $(go list ./...)
test:
cmds:
- go test ./...
live-web:
cmds:
- air --build.cmd "go build -o build/web cmd/web/main.go" --build.bin "./build/web"