Files
query-orchestration/vendor/github.com/vektra/mockery/v2/Taskfile.yml
T
Jay Brown 7d78e65d0c Merged in feature/semver (pull request #93)
Add semantic versioning to all services

* working

* Merge branch 'main' of bitbucket.org:aarete/query-orchestration into feature/semver

* 1.24 mod

* go upgrade

* tool

* Merge branch 'main' of bitbucket.org:aarete/query-orchestration into feature/semver
2025-03-06 22:33:39 +00:00

100 lines
1.9 KiB
YAML

version: "3"
tasks:
coverage:
deps: [test]
desc: run unit tests and create HTML coverage file
cmds:
- go tool cover -html=coverage.txt
fmt:
desc: auto-format all go files
sources:
- "**/*.go"
cmds:
- go fmt ./...
mocks:
desc: generate new mocks from scratch
deps: [mocks.remove, mocks.generate]
mocks.remove:
desc: remove all mock files
cmds:
- find . -name '*_mock.go' -o -name 'mock_*_test.go' | xargs -r rm
- rm -rf mocks/
mocks.generate:
desc: generate mockery mocks
cmds:
- go run .
docker:
desc: build the mockery docker image
cmds:
- docker build -t vektra/mockery .
mkdocs.install:
desc: install mkdocs and plugins
sources:
- "docs/requirements.txt"
cmds:
- pip install -r docs/requirements.txt
mkdocs.serve:
desc: serve mkdocs locally
deps: [mkdocs.install]
cmds:
- mkdocs serve
lint:
desc: run all the defined linters
sources:
- "**/*.go"
cmds:
- go run github.com/golangci/golangci-lint/cmd/golangci-lint run
test:
cmds:
- go run gotest.tools/gotestsum --format testname -- -v -coverprofile=coverage.txt ./...
desc: run unit tests
sources:
- "**/*.go"
generates:
- coverage.txt
test.e2e:
desc: run end-to-end tests
sources:
- "**/*.go"
- "./.mockery.yaml"
cmds:
- ./e2e/run_all.sh
test.ci:
deps: [fmt, lint]
cmds:
- task: mocks.remove
- task: mocks.generate
- task: test
- task: test.e2e
default:
deps: [test.ci]
build-tools:
desc: Build tools directory
cmds:
- cd ./tools && go build -o tools .
tag:
desc: Tag the git repo with the version specified.
deps: [build-tools]
cmds:
- ./tools/tools tag --dry-run=false
tag.push:
desc: Push tags to origin
cmds:
- git push origin --tags --force