✨ Initial project setup with basic scaffolding, build tools, and agent guidelines.
This commit is contained in:
parent
f4a95feb60
commit
8c595a9080
6 changed files with 142 additions and 0 deletions
55
Taskfile.yml
Normal file
55
Taskfile.yml
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
version: '3'
|
||||
|
||||
tasks:
|
||||
default:
|
||||
cmds:
|
||||
- task: fmt
|
||||
- task: test
|
||||
- task: lint
|
||||
|
||||
fmt:
|
||||
desc: Format go code
|
||||
sources:
|
||||
- '**/*.go'
|
||||
cmds:
|
||||
- go fmt ./...
|
||||
- go mod tidy
|
||||
|
||||
lint:
|
||||
desc: Do static analysis
|
||||
sources:
|
||||
- '**/*.go'
|
||||
cmds:
|
||||
- golangci-lint run
|
||||
|
||||
test:
|
||||
desc: Run unit tests
|
||||
deps: [fmt]
|
||||
sources:
|
||||
- '**/*.go'
|
||||
generates:
|
||||
- build/cover.out
|
||||
cmds:
|
||||
- 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
|
||||
deps: [coverage-report]
|
||||
cmds:
|
||||
- ip addr list | grep inet
|
||||
- python3 -m http.server -d build 3434
|
||||
|
||||
serve-docs:
|
||||
desc: Serve the current docs
|
||||
cmds:
|
||||
- godoc -http=0.0.0.0:3434 -play
|
||||
Loading…
Add table
Add a link
Reference in a new issue