chore(repo): add local workflow targets
All checks were successful
Security Scan / security (push) Successful in 18s
Test / test (push) Successful in 1m17s

Co-Authored-By: Virgil <virgil@lethean.io>
This commit is contained in:
Virgil 2026-04-02 14:48:13 +00:00
parent 5020fbef42
commit 1ae029cfdb
3 changed files with 47 additions and 0 deletions

6
.gitignore vendored
View file

@ -4,3 +4,9 @@
# Knowledge base
KB/
.core/
# Local Go tooling caches
.cache/
.gocache/
.gomodcache/
.gopath/

30
Makefile Normal file
View file

@ -0,0 +1,30 @@
.PHONY: build vet test cover tidy clean
override GOCACHE := $(CURDIR)/.cache/go-build
override GOPATH := $(CURDIR)/.cache/go
GO ?= go
GO_ENV = GOCACHE=$(GOCACHE) GOPATH=$(GOPATH)
build:
@mkdir -p $(GOCACHE) $(GOPATH)
@$(GO_ENV) $(GO) build ./...
vet:
@mkdir -p $(GOCACHE) $(GOPATH)
@$(GO_ENV) $(GO) vet ./...
test:
@mkdir -p $(GOCACHE) $(GOPATH)
@$(GO_ENV) $(GO) test ./... -count=1 -timeout 120s
cover:
@mkdir -p $(GOCACHE) $(GOPATH)
@$(GO_ENV) $(GO) test -cover ./...
tidy:
@mkdir -p $(GOCACHE) $(GOPATH)
@$(GO_ENV) $(GO) mod tidy
clean:
@rm -rf $(CURDIR)/.cache $(CURDIR)/.gocache $(CURDIR)/.gomodcache $(CURDIR)/.gopath

View file

@ -45,6 +45,17 @@ go test -bench=. ./...
go build ./...
```
For repeatable local runs in a clean workspace, the repo also ships a
`Makefile` with the standard workflow targets:
```bash
make build
make vet
make test
make cover
make tidy
```
## Licence
European Union Public Licence 1.2 — see [LICENCE](LICENCE) for details.