terraform-provider-tor/GNUmakefile

46 lines
1,007 B
Text
Raw Normal View History

2025-06-03 13:23:45 +02:00
default: fmt lint install generate
build:
go build -v ./...
install: build
go install -v ./...
lint:
golangci-lint run
generate:
cd tools; go generate ./...
fmt:
gofmt -s -w -e .
test:
go test -v -cover -timeout=120s -parallel=10 ./...
testacc:
TF_ACC=1 go test -v -cover -timeout 120m ./...
2025-06-03 14:28:37 +02:00
e2e:
@echo "Running end-to-end test..."
cd e2e-test && \
rm -rf .terraform/ .terraform.lock.hcl terraform.tfstate* && \
./setup-dev.sh && \
TF_CLI_CONFIG_FILE=.terraformrc terraform plan && \
TF_CLI_CONFIG_FILE=.terraformrc terraform apply -auto-approve && \
echo "✓ E2E test passed! Cleaning up..." && \
TF_CLI_CONFIG_FILE=.terraformrc terraform destroy -auto-approve && \
echo "✓ E2E test completed successfully"
2025-06-03 14:34:20 +02:00
ci:
@echo "1/4 Running linter..."
$(MAKE) lint
@echo "2/4 Building provider..."
$(MAKE) build
@echo "3/4 Running acceptance tests..."
$(MAKE) testacc
@echo "4/4 Running end-to-end tests..."
$(MAKE) e2e
.PHONY: fmt lint test testacc build install generate e2e ci