mirror of
https://github.com/k8snetworkplumbingwg/whereabouts.git
synced 2025-06-03 06:42:26 +00:00
build, test: update go test to use go1.17
Signed-off-by: Miguel Duarte Barroso <mdbarroso@redhat.com>
This commit is contained in:
parent
c86cbce8a8
commit
2592e8714f
@ -2,11 +2,20 @@
|
||||
# single test: go test -v ./pkg/storage/
|
||||
# without cache: go test -count=1 -v ./pkg/storage/
|
||||
set -e -x
|
||||
|
||||
GO=${GO:-go}
|
||||
|
||||
echo "Running go vet ..."
|
||||
go vet --tags=test ./cmd/... ./pkg/...
|
||||
${GO} vet --tags=test ./cmd/... ./pkg/...
|
||||
|
||||
|
||||
echo "Running golang staticcheck ..."
|
||||
staticcheck --tags=test ./...
|
||||
|
||||
echo "Running go tests..."
|
||||
KUBEBUILDER_ASSETS="$(pwd)/bin" go test --tags=test -v -covermode=count -coverprofile=coverage.out $(go list ./... | grep -v e2e | tr "\n" " ")
|
||||
KUBEBUILDER_ASSETS="$(pwd)/bin" ${GO} test \
|
||||
--tags=test \
|
||||
-v \
|
||||
-covermode=count \
|
||||
-coverprofile=coverage.out \
|
||||
$(${GO} list ./... | grep -v e2e | tr "\n" " ")
|
||||
|
Loading…
Reference in New Issue
Block a user