-
Notifications
You must be signed in to change notification settings - Fork 12
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
WIP: tekton: add go-unit-tests and golangci lint #347
base: main
Are you sure you want to change the base?
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: rphillips The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
make test | ||
|
||
- name: lint | ||
image: golangci/golangci-lint:latest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd recommend against latest for build tooling. Can we pin?
8923e88
to
6aacaa5
Compare
Makefile
Outdated
@@ -138,6 +138,10 @@ vet: ## Run go vet against code. | |||
test: manifests generate fmt vet envtest ## Run tests. | |||
KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) --bin-dir $(LOCALBIN) -p path)" go test $$(go list ./... | grep -v /e2e) -coverprofile cover.out | |||
|
|||
.PHONY: test-unit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you just reuse test
above?
I think you are missing the dependency targets for test-unit
so I think this may fail.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't want it to generate, or format or vet...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, maybe I need the envtest dependency?
For a proper CI pipeline, I think unit tests should probably block builds as they would be invalid. Same with linting. We can more forward with this PR as is, but we should probably create additional tasks in the existing PR pipelines so we can use logic to order and fail as necessary. |
41b7785
to
3bbdcca
Compare
3bbdcca
to
7edd622
Compare
@rphillips: all tests passed! Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
No description provided.