chore: run tests in all packages

This commit is contained in:
Vladimir Mihailenco 2023-01-30 09:52:13 +02:00
parent 98a8502d8e
commit ddb0bc08be
1 changed files with 11 additions and 7 deletions

View File

@ -1,11 +1,15 @@
PACKAGE_DIRS := $(shell find . -mindepth 2 -type f -name 'go.mod' -exec dirname {} \; | sort)
GO_MOD_DIRS := $(shell find . -mindepth 2 -type f -name 'go.mod' -exec dirname {} \; | sort)
test: testdeps
go test ./...
go test ./... -short -race
go test ./... -run=NONE -bench=. -benchmem
env GOOS=linux GOARCH=386 go test ./...
go vet
set -e; for dir in $(GO_MOD_DIRS); do \
echo "go test in $${dir}"; \
(cd "$${dir}" && \
go test && \
go test ./... -short -race &&
go test ./... -run=NONE -bench=. -benchmem &&
env GOOS=linux GOARCH=386 go test && \
go vet); \
done
cd internal/customvet && go build .
go vet -vettool ./internal/customvet/customvet
@ -28,7 +32,7 @@ fmt:
goimports -w -local github.com/redis/go-redis ./
go_mod_tidy:
set -e; for dir in $(PACKAGE_DIRS); do \
set -e; for dir in $(GO_MOD_DIRS); do \
echo "go mod tidy in $${dir}"; \
(cd "$${dir}" && \
go get -u ./... && \