Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: [#124] Make variables that are required, mandatory #125

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,14 @@ tasks:
echo "The actual code coverage: '${code_coverage_actual}' exceeds the expected coverage. Please adjust the threshold that is defined in the .github/workflows/golang.yml workflow from '{{.CODE_COVERAGE_EXPECTED}}' to '${code_coverage_actual}'."
exit 1
fi
requires:
vars:
[
CODE_COVERAGE_EXPECTED,
CODE_COVERAGE_FILE_EXCLUSIONS,
COVERPROFILE,
TEST_TAGS,
]
coverage-visual:
silent: true
cmds:
Expand All @@ -79,6 +87,8 @@ tasks:
-html={{.COVERPROFILE}} \
-o coverage.html
open ./coverage.html
requires:
vars: [CODE_COVERAGE_FILE_EXCLUSIONS, COVERPROFILE, TEST_TAGS]
helm-install:
silent: true
cmds:
Expand All @@ -88,13 +98,17 @@ tasks:
-fsSL https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 |\
bash -s -- --version {{.HELM_VERSION}}
fi
requires:
vars: [HELM_VERSION]
gci-install:
silent: true
cmds:
- |
if ! ~/go/bin/gci --version | grep -q "gci version {{.GCI_VERSION}}"; then
go install github.com/daixiang0/gci@v{{.GCI_VERSION}}
fi
requires:
vars: [GCI_VERSION]
gci:
silent: true
cmds:
Expand All @@ -120,6 +134,8 @@ tasks:
-sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh |\
sh -s -- -b $(go env GOPATH)/bin v{{.GOLANGCI_LINT_VERSION}}
fi
requires:
vars: [GOLANGCI_LINT_VERSION]
golangci-lint-run:
silent: true
cmds:
Expand All @@ -131,6 +147,8 @@ tasks:
--out-format=colored-line-number \
--timeout 2m30s \
--verbose
requires:
vars: [GOLANG_PARALLEL_TESTS]
golangci-lint:
silent: true
cmds:
Expand All @@ -149,6 +167,8 @@ tasks:
if ! gqlgenc version | grep -q {{.GQLGENC_VERSION}}; then
go install github.com/Yamashou/gqlgenc@{{.GQLGENC_VERSION}}
fi
requires:
vars: [GQLGENC_VERSION]
lint:
silent: true
deps:
Expand All @@ -166,6 +186,15 @@ tasks:
--dir {{.MOCK_GENERATE_DIR}} \
--name {{.MOCK_GENERATE_INTERFACE_NAME}} \
--output {{.MOCK_GENERATE_DIR}}/mocks
requires:
vars:
[
MOCKERY_BIN,
MOCK_GENERATE_DIR,
MOCK_GENERATE_INTERFACE_NAME,
MOCKERY_MAJOR_VERSION,
MOCKERY_VERSION,
]
test:
silent: true
cmds:
Expand All @@ -179,6 +208,8 @@ tasks:
-v \
./... \
{{.TEST_EXTRA_ARGS}}
requires:
vars: [GOLANG_PARALLEL_TESTS]
test-component:
silent: true
cmds:
Expand All @@ -205,3 +236,5 @@ tasks:
go install \
github.com/mikefarah/yq/{{.YQ_MAJOR_VERSION}}@{{.YQ_VERSION}}
fi
requires:
vars: [YQ_VERSION, YQ_MAJOR_VERSION]
Loading