2022-05-13 13:30:22 +00:00
|
|
|
default: build
|
|
|
|
|
|
|
|
fmt:
|
|
|
|
@echo "✓ Formatting source code with goimports ..."
|
|
|
|
@goimports -w $(shell find . -type f -name '*.go' -not -path "./vendor/*")
|
|
|
|
@echo "✓ Formatting source code with gofmt ..."
|
|
|
|
@gofmt -w $(shell find . -type f -name '*.go' -not -path "./vendor/*")
|
|
|
|
|
|
|
|
lint: vendor
|
2024-12-11 12:53:57 +00:00
|
|
|
@echo "✓ Linting source code with https://golangci-lint.run/ (with --fix)..."
|
|
|
|
@golangci-lint run --fix ./...
|
|
|
|
|
|
|
|
lintcheck: vendor
|
2024-12-04 17:40:19 +00:00
|
|
|
@echo "✓ Linting source code with https://golangci-lint.run/ ..."
|
|
|
|
@golangci-lint run ./...
|
2022-05-13 13:30:22 +00:00
|
|
|
|
2024-12-04 17:40:19 +00:00
|
|
|
test: lint testonly
|
|
|
|
|
|
|
|
testonly:
|
2022-05-13 13:30:22 +00:00
|
|
|
@echo "✓ Running tests ..."
|
|
|
|
@gotestsum --format pkgname-and-test-fails --no-summary=skipped --raw-command go test -v -json -short -coverprofile=coverage.txt ./...
|
|
|
|
|
|
|
|
coverage: test
|
|
|
|
@echo "✓ Opening coverage for unit tests ..."
|
|
|
|
@go tool cover -html=coverage.txt
|
|
|
|
|
|
|
|
build: vendor
|
|
|
|
@echo "✓ Building source code with go build ..."
|
|
|
|
@go build -mod vendor
|
|
|
|
|
2022-05-14 17:56:09 +00:00
|
|
|
snapshot:
|
|
|
|
@echo "✓ Building dev snapshot"
|
2023-10-27 10:50:41 +00:00
|
|
|
@go build -o .databricks/databricks
|
2022-05-14 17:56:09 +00:00
|
|
|
|
2022-05-13 13:30:22 +00:00
|
|
|
vendor:
|
|
|
|
@echo "✓ Filling vendor folder with library code ..."
|
|
|
|
@go mod vendor
|
|
|
|
|
2024-12-09 09:52:08 +00:00
|
|
|
integration:
|
|
|
|
gotestsum --format github-actions --rerun-fails --jsonfile output.json --packages "./internal/..." -- -run "TestAcc.*" -parallel 4 -timeout=2h
|
2023-10-16 15:32:49 +00:00
|
|
|
|
2024-12-11 12:53:57 +00:00
|
|
|
.PHONY: fmt lint lintcheck test testonly coverage build snapshot vendor integration
|