update readme and taskfile
This commit is contained in:
parent
ff30f6c3d6
commit
efa86a6e22
2 changed files with 60 additions and 3 deletions
43
Taskfile.yml
43
Taskfile.yml
|
|
@ -1,6 +1,43 @@
|
|||
version: '3'
|
||||
|
||||
tasks:
|
||||
test:
|
||||
desc: Run tests
|
||||
default:
|
||||
desc: Run vet and tests
|
||||
cmds:
|
||||
- set -o pipefail && go test fmt -json | tparse -all
|
||||
- task: check
|
||||
|
||||
install:tools:
|
||||
desc: Install development tools (tparse for prettier test output)
|
||||
cmds:
|
||||
- go install github.com/mfridman/tparse@latest
|
||||
|
||||
test:
|
||||
desc: Run tests with prettier output via tparse
|
||||
cmds:
|
||||
- set -o pipefail && go test ./... -json -cover | tparse -all
|
||||
|
||||
test:race:
|
||||
desc: Run tests under the race detector
|
||||
cmds:
|
||||
- set -o pipefail && go test ./... -race -json | tparse -all
|
||||
|
||||
vet:
|
||||
desc: Run go vet
|
||||
cmds:
|
||||
- go vet ./...
|
||||
|
||||
fmt:
|
||||
desc: Format Go source files
|
||||
cmds:
|
||||
- gofmt -w .
|
||||
|
||||
tidy:
|
||||
desc: Tidy go.mod
|
||||
cmds:
|
||||
- go mod tidy
|
||||
|
||||
check:
|
||||
desc: Run vet and tests
|
||||
cmds:
|
||||
- task: vet
|
||||
- task: test
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue