-
Notifications
You must be signed in to change notification settings - Fork 72
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
Add verification and testing targets for CI #4
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ixdy 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 |
hack/verify/verify_modules.sh
Outdated
cd "${TMP_REPO}/boskos" | ||
make update-modules >/dev/null | ||
|
||
if !(git diff --quiet HEAD -- go.sum go.mod hack/tools/go.mod hack/tools/go.sum); then |
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 think the leading !
is wrong?
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.
the parens were weird (I basically copied this from a Makefile) so I've now removed them, but otherwise this should do the right thing - git
exits 0 if no diff, nonzero if diff, so we want to invert that.
go test ./... | ||
.PHONY: test | ||
test: $(GOTESTSUM) | ||
$(GOTESTSUM) $${ARTIFACTS:+--junitfile="${ARTIFACTS}/junit.xml"} ./... |
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.
TILd
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.
this is maybe too clever, but it works for now...
/lgtm |
This PR updates
make test
to use gotestsum (for better test reporting), including automatically generating junit when run in the Prow environment.It also adds several verification checks, wrapped by the
make verify
rule:golangci-lint
(with possibly too many linters enabled; further tuning may be necessary)After this is in, we should be able to create one or more Prow jobs that run
make build
,make test
, andmake verify
./assign @alvaroaleman