parent
d39efbd1e2
commit
eb9188f1e6
1 changed files with 22 additions and 6 deletions
28
GNUmakefile
28
GNUmakefile
|
@ -1,5 +1,8 @@
|
||||||
default: fmt lint install generate
|
default: fmt lint install generate
|
||||||
|
|
||||||
|
clean:
|
||||||
|
go clean -cache -modcache -testcache
|
||||||
|
|
||||||
build:
|
build:
|
||||||
go build -v ./...
|
go build -v ./...
|
||||||
|
|
||||||
|
@ -7,6 +10,7 @@ install: build
|
||||||
go install -v ./...
|
go install -v ./...
|
||||||
|
|
||||||
lint:
|
lint:
|
||||||
|
go mod tidy
|
||||||
golangci-lint run
|
golangci-lint run
|
||||||
|
|
||||||
generate:
|
generate:
|
||||||
|
@ -15,6 +19,14 @@ generate:
|
||||||
fmt:
|
fmt:
|
||||||
gofmt -s -w -e .
|
gofmt -s -w -e .
|
||||||
|
|
||||||
|
fmtcheck:
|
||||||
|
@if [ -n "$$(gofmt -s -l .)" ]; then \
|
||||||
|
echo "The following files are not formatted:"; \
|
||||||
|
gofmt -s -l .; \
|
||||||
|
echo "Run 'make fmt' to fix formatting issues."; \
|
||||||
|
exit 1; \
|
||||||
|
fi
|
||||||
|
|
||||||
test:
|
test:
|
||||||
go test -v -cover -timeout=120s -parallel=10 ./...
|
go test -v -cover -timeout=120s -parallel=10 ./...
|
||||||
|
|
||||||
|
@ -33,13 +45,17 @@ e2e:
|
||||||
echo "✓ E2E test completed successfully"
|
echo "✓ E2E test completed successfully"
|
||||||
|
|
||||||
ci:
|
ci:
|
||||||
@echo "1/4 Running linter..."
|
@echo "Running CI pipeline..."
|
||||||
$(MAKE) lint
|
@echo "1/5 Checking code formatting..."
|
||||||
@echo "2/4 Building provider..."
|
$(MAKE) fmtcheck
|
||||||
|
@echo "2/5 Building provider..."
|
||||||
$(MAKE) build
|
$(MAKE) build
|
||||||
@echo "3/4 Running acceptance tests..."
|
@echo "3/5 Running linter..."
|
||||||
|
$(MAKE) lint
|
||||||
|
@echo "4/5 Running acceptance tests..."
|
||||||
$(MAKE) testacc
|
$(MAKE) testacc
|
||||||
@echo "4/4 Running end-to-end tests..."
|
@echo "5/5 Running end-to-end tests..."
|
||||||
$(MAKE) e2e
|
$(MAKE) e2e
|
||||||
|
@echo "✓ CI pipeline completed successfully!"
|
||||||
|
|
||||||
.PHONY: fmt lint test testacc build install generate e2e ci
|
.PHONY: fmt fmtcheck lint test testacc build install generate e2e ci clean
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue