Tinychain development uses continuous integration. There are multiple workflows on submission of a PR:
- build: builds the Go package.
- test: runs the test suite.
- format - checks the Go code for formatting.
- vet - a specialised Go tool which functions like a linter, catching potential errors in code.
go install golang.org/x/tools/cmd/godoc@latest
godoc -http=:6060
go test -v -run TestStartPeerHeartbeat ./...
# ignore test cache.
go test -v -count=1 -run TestStartPeerHeartbeat ./...
go test -v -run ./... > test.log
Go will run your function multiple times and find the median for a benchmark:
go test -v -bench=1 -run TestBenchmarkTxOpsPerDay
go install github.com/Zxilly/go-size-analyzer/cmd/gsa@latest
gsa --web build/tinychain-darwin-arm64