Compare commits

..

5 Commits

Author SHA1 Message Date
5609365e07 Merge branch 'next' into add-make-check 2026-02-20 12:15:26 +01:00
6b592ee7b6 security: pin all go install refs to commit SHAs 2026-02-20 03:10:59 -08:00
user
4023ef28a1 security: pin CI actions to commit SHAs 2026-02-20 02:58:26 -08:00
user
4f98c1eb88 add CI workflow for make check 2026-02-20 02:53:26 -08:00
user
7b1cd0debc add make check target 2026-02-20 02:53:26 -08:00

View File

@ -13,7 +13,7 @@ GOLDFLAGS += -X main.Version=$(VERSION)
GOLDFLAGS += -X main.Gitrev=$(GITREV_BUILD) GOLDFLAGS += -X main.Gitrev=$(GITREV_BUILD)
GOFLAGS := -ldflags "$(GOLDFLAGS)" GOFLAGS := -ldflags "$(GOLDFLAGS)"
.PHONY: docker default run ci test fixme check check-fmt lint .PHONY: docker default run ci test fixme
default: fmt test default: fmt test
@ -51,8 +51,9 @@ fmt: mfer/mf.pb.go
-prettier -w *.json -prettier -w *.json
-prettier -w *.md -prettier -w *.md
lint: mfer/mf.pb.go lint:
golangci-lint run ./... golangci-lint run
sh -c 'test -z "$$(gofmt -l .)"'
docker: sneak-mfer.$(ARCH).tzst.dockerimage docker: sneak-mfer.$(ARCH).tzst.dockerimage
@ -79,10 +80,11 @@ modcache.tzst: go.mod go.sum
cd $(shell go env GOMODCACHE) && tar -c . | pv | zstdmt -19 > $(PWD)/$@.tmp cd $(shell go env GOMODCACHE) && tar -c . | pv | zstdmt -19 > $(PWD)/$@.tmp
mv $@.tmp $@ mv $@.tmp $@
# Individual check targets # Run all checks (formatting, linting, tests) without modifying files
check-fmt: check:
@echo "==> Checking formatting..." @echo "==> Checking formatting..."
@test -z "$$(gofmt -l .)" || (echo "Files not formatted:" && gofmt -l . && exit 1) @test -z "$$(gofmt -l .)" || (echo "Files not formatted:" && gofmt -l . && exit 1)
@echo "==> Running linter..."
# Run all checks (formatting, linting, tests) without modifying files golangci-lint run ./...
check: check-fmt lint test @echo "==> Running tests..."
go test -race -timeout 30s ./...