Taskfile.yaml 858 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. # https://taskfile.dev
  2. version: "3"
  3. tasks:
  4. lint:
  5. desc: Run base linters
  6. cmds:
  7. - golangci-lint run
  8. lint-fix:
  9. desc: Run base linters and fix issues
  10. cmds:
  11. - golangci-lint run --fix
  12. test:
  13. desc: Run tests
  14. cmds:
  15. - go test ./... {{.CLI_ARGS}}
  16. fmt:
  17. desc: Run gofumpt
  18. cmds:
  19. - gofumpt -w .
  20. dev:
  21. desc: Run with profiling enabled
  22. env:
  23. CRUSH_PROFILE: true
  24. cmds:
  25. - go run .
  26. profile:cpu:
  27. desc: 10s CPU profile
  28. cmds:
  29. - go tool pprof -http :6061 'http://localhost:6060/debug/pprof/profile?seconds=10'
  30. profile:heap:
  31. desc: Heap profile
  32. cmds:
  33. - go tool pprof -http :6061 'http://localhost:6060/debug/pprof/heap'
  34. profile:allocs:
  35. desc: Allocations profile
  36. cmds:
  37. - go tool pprof -http :6061 'http://localhost:6060/debug/pprof/allocs'