Skip to content

Commit

Permalink
enable gorules
Browse files Browse the repository at this point in the history
Signed-off-by: kpango <[email protected]>
  • Loading branch information
kpango committed Mar 15, 2023
1 parent cf54f75 commit f395a48
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 7 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/test-hack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ jobs:
- name: dependencies
run: |
make proto/deps
- name: Pre-Run tests for hack packages
run: |
make test/hack
- name: Run tests for hack packages / gotestfmt
run: |
TEST_RESULT_DIR=${GITHUB_WORKSPACE} make test/hack/gotestfmt
Expand Down
6 changes: 6 additions & 0 deletions Makefile.d/test.mk
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,15 @@ test/hack/tparse: \
tparse/install
set -euo pipefail
rm -rf "$(TEST_RESULT_DIR)/`echo $@ | sed -e 's%/%-%g'`-result.json"
go mod vendor
go test -short -shuffle=on -race -mod=readonly -json -cover \
$(ROOTDIR)/hack/gorules/... \
$(ROOTDIR)/hack/helm/... \
$(ROOTDIR)/hack/license/... \
$(ROOTDIR)/hack/tools/... \
| tee "$(TEST_RESULT_DIR)/`echo $@ | sed -e 's%/%-%g'`-result.json" \
| tparse -pass -notests
rm -rf $(ROOTDIR)/vendor

.PHONY: test/all/tparse
## run tests for all Go codes and show table
Expand Down Expand Up @@ -154,13 +156,15 @@ test/hack/gotestfmt: \
gotestfmt/install
set -euo pipefail
rm -rf "$(TEST_RESULT_DIR)/`echo $@ | sed -e 's%/%-%g'`-result.json"
go mod vendor
go test -short -shuffle=on -race -mod=readonly -json -cover \
$(ROOTDIR)/hack/gorules/... \
$(ROOTDIR)/hack/helm/... \
$(ROOTDIR)/hack/license/... \
$(ROOTDIR)/hack/tools/... \
| tee "$(TEST_RESULT_DIR)/`echo $@ | sed -e 's%/%-%g'`-result.json" \
| gotestfmt -showteststatus
rm -rf $(ROOTDIR)/vendor

.PHONY: test/all/gotestfmt
## run tests for all Go codes and show table
Expand Down Expand Up @@ -190,11 +194,13 @@ test/cmd:
.PHONY: test/hack
## run tests for hack
test/hack:
go mod vendor
go test -short -shuffle=on -race -mod=readonly -cover \
$(ROOTDIR)/hack/gorules... \
$(ROOTDIR)/hack/helm/... \
$(ROOTDIR)/hack/license/...\
$(ROOTDIR)/hack/tools/...
rm -rf $(ROOTDIR)/vendor

.PHONY: test/all
## run tests for all Go codes
Expand Down
10 changes: 5 additions & 5 deletions apis/grpc/v1/payload/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ type Payload interface {
ProtoMessage()
ProtoReflect() protoreflect.Message
Descriptor() ([]byte, []int)
// MarshalToSizedBufferVT(dAtA []byte) (int, error)
// MarshalToVT(dAtA []byte) (int, error)
// MarshalVT() (dAtA []byte, err error)
// SizeVT() (n int)
// UnmarshalVT(dAtA []byte) error
MarshalToSizedBufferVT(dAtA []byte) (int, error)
MarshalToVT(dAtA []byte) (int, error)
MarshalVT() (dAtA []byte, err error)
SizeVT() (n int)
UnmarshalVT(dAtA []byte) error
}
2 changes: 0 additions & 2 deletions hack/gorules/rules_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
//go:build exclude

// Copyright (C) 2019-2023 vdaas.org vald team <[email protected]>
//
// Licensed under the Apache License, Version 2.0 (the "License");
Expand Down

0 comments on commit f395a48

Please sign in to comment.