Skip to content

Commit bba17fa

Browse files
committed
Fix CI target tool checks
1 parent 433dcfb commit bba17fa

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

Makefile

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ GOSEC ?= $(GOBIN)/gosec
88
OPA ?= opa
99
export PATH := $(GOBIN):$(PATH)
1010

11-
.PHONY: all tidy build test lint format lint-go lint-python format-go format-python docker-up docker-down docker-logs db-migrate opa-test cert-refresh setup-venv security install-hooks install-tools install-format-tools install-lint-tools install-security-tools install-opa check-tools check-format-tools
11+
.PHONY: all tidy build test lint format lint-go lint-python format-go format-python docker-up docker-down docker-logs db-migrate opa-test cert-refresh setup-venv security install-hooks install-tools install-format-tools install-lint-tools install-security-tools install-opa check-tools check-format-tools check-lint-tools check-test-tools
1212

1313
all: build
1414

@@ -156,6 +156,14 @@ check-format-tools:
156156
@command -v black >/dev/null 2>&1 || { echo "black not found. Run 'make install-format-tools'"; exit 1; }
157157
@command -v isort >/dev/null 2>&1 || { echo "isort not found. Run 'make install-format-tools'"; exit 1; }
158158

159+
check-lint-tools:
160+
@test -x "$(GOLANGCI_LINT)" || { echo "golangci-lint not found at $(GOLANGCI_LINT). Run 'make install-lint-tools'"; exit 1; }
161+
@command -v flake8 >/dev/null 2>&1 || { echo "flake8 not found. Run 'make install-lint-tools'"; exit 1; }
162+
@command -v mypy >/dev/null 2>&1 || { echo "mypy not found. Run 'make install-lint-tools'"; exit 1; }
163+
164+
check-test-tools:
165+
@command -v pytest >/dev/null 2>&1 || { echo "pytest not found. Install app requirements first"; exit 1; }
166+
159167
security:
160168
@echo "Running govulncheck..."
161169
@# govulncheck currently fails due to golang.org/x/sync/semaphore type info missing via github.com/jackc/puddle/v2
@@ -166,8 +174,8 @@ security:
166174
$(GOSEC) ./...
167175

168176
# CI/CD targets
169-
ci-lint: check-tools lint
170-
ci-test: check-tools test
177+
ci-lint: check-lint-tools lint
178+
ci-test: check-test-tools test
171179
ci-format-check: check-format-tools
172180
@echo "Checking Go formatting..."
173181
@if [ "$$(gofmt -l . | wc -l)" -ne 0 ]; then echo "Go files need formatting. Run 'make format-go'"; exit 1; fi

0 commit comments

Comments
 (0)