Skip to content

Commit

Permalink
Add descriptions to most tasks
Browse files Browse the repository at this point in the history
I deliberately only described the tasks I expect an end-user of this
Taskfile.yml to see when running `task --list`. The others still show up
when running `task --list-all`.
  • Loading branch information
markvl-sbp committed Nov 14, 2024
1 parent 2150f7a commit 76daf89
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,13 @@ vars:

tasks:
build-golang-download-modules:
desc: download go modules
silent: true
cmds:
- |
go mod tidy
desc: download go modules
coverage:
desc: check code coverage
silent: true
cmds:
- task: test
Expand Down Expand Up @@ -64,6 +65,7 @@ tasks:
exit 1
fi
coverage-visual:
desc: show code coverage
silent: true
cmds:
- task: test
Expand Down Expand Up @@ -97,6 +99,7 @@ tasks:
go install github.com/daixiang0/gci@v{{.GCI_VERSION}}
fi
gci:
desc: check for incorrect import order with gci
silent: true
cmds:
- task: gci-install
Expand All @@ -108,6 +111,7 @@ tasks:
exit 1
fi
gci-write:
desc: fix incorrect import order with gci
silent: true
cmds:
- task: gci-install
Expand All @@ -133,6 +137,7 @@ tasks:
--timeout 2m30s \
--verbose
golangci-lint:
desc: run golangci-lint
silent: true
cmds:
- task: golangci-lint-install
Expand All @@ -151,19 +156,22 @@ tasks:
go install github.com/Yamashou/gqlgenc@{{.GQLGENC_VERSION}}
fi
lint:
desc: run golangci-lint (alias for golangci-lint)
silent: true
cmds:
- task: golangci-lint
lint-with-gci:
desc: run gci and golangci-lint
silent: true
deps:
- task: gci
- task: golangci-lint
mock-generate:
desc: generate mocks
silent: true
cmds:
- |
if ! {{.MOCKERY_BIN}} --version | grep "{{.MOCKERY_VERSION}}"; then
if ! {{.MOCKERY_BIN}} --version | grep "{{.MOCKERY_VERSION}}"; then
go install github.com/vektra/mockery/{{.MOCKERY_MAJOR_VERSION}}@{{.MOCKERY_VERSION}}
fi
echo "{{.MOCK_GENERATE_DIR}} {{.MOCK_GENERATE_INTERFACE_NAME}}"
Expand All @@ -173,6 +181,7 @@ tasks:
--output {{.MOCK_GENERATE_DIR}}/mocks \
--tags {{.BUILD_TAGS}}
test:
desc: run unit tests
silent: true
cmds:
- |
Expand All @@ -186,18 +195,21 @@ tasks:
./... \
{{.TEST_EXTRA_ARGS}}
test-component:
desc: run component tests
silent: true
cmds:
- task: test
vars:
TEST_TAGS: component
test-e2e:
desc: run end-to-end tests
silent: true
cmds:
- task: test
vars:
TEST_TAGS: e2e
test-integration:
desc: run integration tests
silent: true
cmds:
- task: test
Expand Down

0 comments on commit 76daf89

Please sign in to comment.