2022-01-07 20:20:48 +01:00
|
|
|
version: '2'
|
2021-04-16 14:21:36 +02:00
|
|
|
|
2022-01-07 20:20:48 +01:00
|
|
|
env:
|
|
|
|
GOFLAGS: -mod=vendor
|
2021-04-16 14:21:36 +02:00
|
|
|
|
2022-01-07 20:20:48 +01:00
|
|
|
tasks:
|
|
|
|
default:
|
|
|
|
deps: [test]
|
2021-04-16 14:21:36 +02:00
|
|
|
|
2022-01-07 20:20:48 +01:00
|
|
|
lint:
|
|
|
|
desc: Checks code style
|
|
|
|
cmds:
|
|
|
|
- gofmt -d -s *.go
|
|
|
|
- go vet ./...
|
|
|
|
silent: true
|
2021-04-16 14:21:36 +02:00
|
|
|
|
2022-01-07 20:20:48 +01:00
|
|
|
lint-fix:
|
|
|
|
desc: Fixes code style
|
|
|
|
cmds:
|
|
|
|
- gofmt -w -s *.go
|
2021-04-16 14:21:36 +02:00
|
|
|
|
2022-01-07 20:20:48 +01:00
|
|
|
test:
|
|
|
|
desc: Runs go tests
|
|
|
|
cmds:
|
|
|
|
- go test -race ./...
|
|
|
|
|
|
|
|
test-coverage:
|
|
|
|
desc: Runs go tests and calucates test coverage
|
|
|
|
cmds:
|
|
|
|
- go test -race -coverprofile=c.out ./...
|