🛠 Add code coverage/docs
This commit is contained in:
parent
8640832a27
commit
e53c7e663d
1 changed files with 26 additions and 1 deletions
27
Taskfile.yml
27
Taskfile.yml
|
|
@ -35,5 +35,30 @@ tasks:
|
|||
desc: Run all tests
|
||||
sources:
|
||||
- '*.go'
|
||||
generates:
|
||||
- build/cover.out
|
||||
cmds:
|
||||
- go test -cover -race .
|
||||
- go test -race -cover -coverprofile build/cover.out .
|
||||
|
||||
coverage-report:
|
||||
desc: Build coverage report
|
||||
deps: [test]
|
||||
sources:
|
||||
- build/cover.out
|
||||
generates:
|
||||
- build/cover.html
|
||||
cmds:
|
||||
- go tool cover -html=build/cover.out -o build/cover.html
|
||||
|
||||
serve-report:
|
||||
desc: Serve the coverage report
|
||||
sources:
|
||||
- build/cover.html
|
||||
cmds:
|
||||
- ip addr list | grep inet
|
||||
- python3 -m http.server -d build/ 3434
|
||||
|
||||
serve-docs:
|
||||
desc: Serve the docs
|
||||
cmds:
|
||||
- godoc -http=0.0.0.0:3434 -play
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue