diff --git a/Taskfile.yaml b/Taskfile.yaml new file mode 100644 index 0000000..7e4269f --- /dev/null +++ b/Taskfile.yaml @@ -0,0 +1,50 @@ +# This file lists all the tasks developers can run while developing this library. +# Run `task -a` to list all the available tasks +# See https://taskfile.dev/ for details +version: '3' + +tasks: + + setup: + desc: Install necessary tools + internal: true + silent: true + cmds: + - > + curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | + sh -s -- -b {{ .GOPATH }}/bin v{{ .GOLANGCILINT_VERSION }} + status: + - command -v golangci-lint + - golangci-lint --version | grep -q "{{ .GOLANGCILINT_VERSION }}" + vars: + GOLANGCILINT_VERSION: 1.58.0 + GOPATH: + sh: go env GOPATH + + deps: + desc: Install necessary Go dependencies + internal: true + silent: true + cmds: + - go mod download + - go mod tidy + + format: + desc: Check Go formatting + cmds: + - go fmt ./... + + lint: + desc: Lint with golangci-lint + cmds: + - golangci-lint run --timeout=5m + + test: + desc: Run acceptance tests + deps: + - setup + - deps + - format + - lint + cmds: + - go test -v ./...