mirror of
https://github.com/hanzoai/docdb.git
synced 2026-10-30 18:39:39 +00:00
33 lines
1.3 KiB
YAML
33 lines
1.3 KiB
YAML
# All commands should be invoked from the parent directory; see Taskfile.yml there.
|
|
---
|
|
version: 3
|
|
|
|
vars:
|
|
PACKAGES: ./checkcomments/... ./checkdocs/... ./checkswitch/... ./definedockertag/... ./generatechangelog/... ./github/...
|
|
RACE_FLAG: -race={{and (ne OS "windows") (ne ARCH "arm") (ne ARCH "riscv64")}}
|
|
|
|
tasks:
|
|
tools-test-short:
|
|
desc: "Run short unit tests (with caching)"
|
|
cmds:
|
|
- ../bin/envtool{{exeExt}} shell rmdir ../tmp/githubcache
|
|
- ../bin/envtool{{exeExt}} shell mkdir ../tmp/githubcache
|
|
- go test -short {{.RACE_FLAG}} -shuffle=on -coverprofile=cover.txt {{.PACKAGES}}
|
|
|
|
tools-test:
|
|
desc: "Run all unit tests"
|
|
cmds:
|
|
- ../bin/envtool{{exeExt}} shell rmdir ../tmp/githubcache
|
|
- ../bin/envtool{{exeExt}} shell mkdir ../tmp/githubcache
|
|
- go test -count=1 {{.RACE_FLAG}} -shuffle=on -coverprofile=cover.txt {{.PACKAGES}}
|
|
|
|
lint:
|
|
desc: "Run linters"
|
|
cmds:
|
|
- ../bin/golangci-lint{{exeExt}} run --config=../.golangci.yml {{.PACKAGES}}
|
|
- ../bin/golangci-lint{{exeExt}} run --config=../.golangci-new.yml {{.PACKAGES}}
|
|
- ../bin/go-consistent{{exeExt}} -pedantic {{.PACKAGES}}
|
|
|
|
- go vet -vettool=../bin/checkswitch{{exeExt}} {{.PACKAGES}}
|
|
- go vet -vettool=../bin/checkcomments{{exeExt}} {{.PACKAGES}}
|