This commit is contained in:
Martino Ferrari
2026-06-24 01:39:15 +02:00
parent 11120bedca
commit c0f7e662be
76 changed files with 4368 additions and 210 deletions
+12 -1
View File
@@ -1,4 +1,4 @@
.PHONY: all frontend backend backend-debug backend-pam release catools test bench race lint clean run
.PHONY: all frontend backend backend-debug backend-pam release catools test cover bench race lint fmt clean run
# --------------------------------------------------------------------------- #
# Sources — adding any file here triggers a frontend or backend rebuild #
@@ -89,11 +89,18 @@ release: $(FRONTEND_OUT)
test:
go test ./...
cd pkg/ca && go test ./...
cd pkg/pva && go test ./...
# Run tests with the race detector enabled.
race:
go test -race ./...
cd pkg/ca && go test -race ./...
cd pkg/pva && go test -race ./...
# Run the main module's tests with coverage and print the total.
cover:
go test -coverprofile=coverage.out ./...
go tool cover -func=coverage.out | tail -1
# Run all benchmarks and print memory allocations.
bench:
@@ -102,6 +109,10 @@ bench:
lint:
go vet ./...
# Rewrite all Go sources in canonical gofmt form (matches the CI gofmt gate).
fmt:
gofmt -w $(shell git ls-files '*.go')
run: $(BINARY)
$(BINARY)