# The checks that CI runs. `make test` needs the Go toolchain, staticcheck, # and a C compiler, because the race detector needs cgo. CI has no C # compiler, so it runs `make test RACE=`. STATICCHECK ?= staticcheck RACE ?= -race .PHONY: test test: test -z "$$(gofmt -l .)" || { gofmt -l .; exit 1; } go mod tidy -diff go vet ./... $(STATICCHECK) ./... go test $(RACE) -covermode=atomic -coverprofile=coverage.out ./... # The kustomize base must build, and so must the example overlay, which # adds the monitoring component. KUSTOMIZE ?= kustomize .PHONY: test-deploy test-deploy: $(KUSTOMIZE) build deploy > /dev/null $(KUSTOMIZE) build examples/overlay > /dev/null