-
Notifications
You must be signed in to change notification settings - Fork 2
/
Taskfile.yml
48 lines (47 loc) · 1.45 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
version: '2'
tasks:
coverage:
desc: 'Run tests with coverage and open report in default browser'
cmds:
- go test -coverpkg=./... -coverprofile=./tmp/cover.out ./...
- go tool cover -html=./tmp/cover.out -o ./tmp/cover.html
- open ./tmp/cover.html
attach_hooks:
desc: "Attaches git hooks"
cmds:
- cp ./tools/prepare-commit-msg.sh ./.git/hooks/prepare-commit-msg
- cp ./tools/pre-commit.sh ./.git/hooks/pre-commit
- cp ./tools/pre-push.sh ./.git/hooks/pre-push
- chmod 777 ./.git/hooks/prepare-commit-msg
- chmod 777 ./.git/hooks/pre-commit
- chmod 777 ./.git/hooks/pre-push
lint:
desc: "Run linter"
cmds:
- golangci-lint run ./...
generate:
desc: "Generates code by json spec"
cmds:
- go run ./cmd/gen
- go fmt ./client/*.gen.go
- goimports -w ./client/*.gen.go
- golangci-lint run --fix ./client/
download_sdk:
desc: "Downloads SDK"
cmds:
- rm -rf ./tmp/libton_client.*
- wget https://binaries.tonlabs.io/tonclient_1_{{OS}}.gz -O ./tmp/libton_client.{{if eq OS "darwin"}}dylib{{else}}so{{end}}.gz
- gzip -d ./tmp/*.gz
- chmod 777 ./tmp/libton_client.*
run:
desc: "Run in host system without container"
cmds:
- go run ./cmd/cli
test:
desc: "Run tests"
cmds:
- go test -tags without_local_ton_node ./...
full_test:
desc: "Run tests with local ton node"
cmds:
- go test ./...