ci: add base

This commit is contained in:
2026-05-16 20:07:04 +02:00
parent 9b0d6a3279
commit cc32a01246
10 changed files with 579 additions and 28 deletions
+26 -1
View File
@@ -2,14 +2,39 @@ ifneq (,$(wildcard ./.env))
include .env
export
endif
.PHONY: build run codegen
.PHONY: build run codegen build-image test test-unit test-coverage lint format check-format
build:
go build -o main
build-image:
docker build -t authentik-kubernetes-operator:latest .
run:
make build
./main --kubeconfig=/home/tbehrendt/.kube/config
codegen:
./scripts/codegen.sh
test: test-unit test-coverage
test-unit:
go test . -coverprofile=coverage.out
test-coverage:
go tool gcov2lcov -infile coverage.out > lcov.info
lint:
go vet ./...
format:
gofmt -w .
check-format:
@OUTPUT=$$(gofmt -l .); \
if [ -n "$$OUTPUT" ]; then \
echo "Formatter failed for:"; \
echo "$$OUTPUT"; \
exit 1; \
fi