-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathMakefile
More file actions
57 lines (45 loc) · 1.38 KB
/
Makefile
File metadata and controls
57 lines (45 loc) · 1.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
.PHONY: clean
clean:
rm -fr dist
# TODO: Digicert signing will be reimplemented in GitHub Actions.
# Local build of the plugin. This saves time building only the host platform.
# Uses native Go commands to avoid Goreleaser dependency.
.PHONY: local
local:
mkdir -p dist
GOOS=$(shell go env GOOS) GOARCH=$(shell go env GOARCH) \
output_name="dist/launchpad_$${GOOS}_$${GOARCH}"; \
if [ "$${GOOS}" = "windows" ]; then \
output_name="$${output_name}.exe"; \
fi; \
go build -o "$${output_name}" ./main.go && \
./$${output_name} --help
# run linting
.PHONY: lint
lint:
golangci-lint run
# security scanning
.PHONY: security-scan
security-scan:
govulncheck ./...
# Testing related targets
# TEST_FLAGS can be set in CI to e.g. -short to skip tests that need network/OCI
TEST_FLAGS?=
.PHONY: unit-test
unit-test:
go test -v --tags 'testing' $(TEST_FLAGS) ./pkg/...
.PHONY: functional-test
functional-test:
go test -v ./test/functional/... -timeout 20m
.PHONY: integration-test
integration-test:
go test -v ./test/integration/... -timeout 20m
.PHONY: smoke-small
smoke-small:
go test -count=1 -v ./test/smoke/... -run TestSmallCluster -timeout 20m
.PHONY: smoke-full
smoke-full:
go test -count=1 -v ./test/smoke/... -run TestSupportedMatrixCluster -timeout 50m
.PHONY: clean-launchpad-chart
clean-launchpad-chart:
terraform -chdir=./examples/tf-aws/launchpad apply --auto-approve --destroy