databricks-cli/Makefile

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

46 lines
1.2 KiB
Makefile
Raw Permalink Normal View History

2022-05-13 13:30:22 +00:00
default: build
lint: vendor
@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"
@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
schema:
@echo "✓ Generating json-schema ..."
@go run ./bundle/internal/schema ./bundle/internal/schema ./bundle/schema/jsonschema.json
2022-05-13 13:30:22 +00:00
INTEGRATION = gotestsum --format github-actions --rerun-fails --jsonfile output.json --packages "./integration/..." -- -parallel 4 -timeout=2h
integration:
$(INTEGRATION)
integration-short:
$(INTEGRATION) -short
.PHONY: lint lintcheck test testonly coverage build snapshot vendor schema integration integration-short