-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c009110
commit b73d519
Showing
1 changed file
with
50 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 ./... |