-
Notifications
You must be signed in to change notification settings - Fork 225
Expand file tree
/
Copy pathMakefile
More file actions
55 lines (43 loc) · 1.27 KB
/
Makefile
File metadata and controls
55 lines (43 loc) · 1.27 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
all: build
.PHONY: all
build:
hack/build-go.sh
.PHONY: build
gotestsum:
which gotestsum || go install gotest.tools/gotestsum@latest
.PHONY: gotestsum
JUNIT_DIR := "_output"
PACKAGES := "./..."
ifeq ($(CI),true)
JUNIT_DIR := "$(ARTIFACT_DIR)"
# tests in github.com/openshift/cluster-version-operator/test/ will be executed separately in CI
PACKAGES := $(shell go list ./... | grep -v "github.com/openshift/cluster-version-operator/test/" | xargs)
endif
test: gotestsum
gotestsum --junitfile="$(JUNIT_DIR)/junit.xml" --packages="$(PACKAGES)"
.PHONY: test
integration-test:
# This runs against a real OpenShift cluster through the current KUBECONFIG context
TEST_INTEGRATION=1 go test ./... -test.run=^TestIntegration
.PHONY: integration-test
update: build
hack/update-test-metadata.sh
.PHONY: update
format:
go fmt ./...
.PHONY: format
imports:
which gci || go install -mod=mod github.com/daixiang0/gci@latest
gci write --custom-order -s standard -s default -s "prefix(k8s.io)" -s "prefix(github.com/openshift)" -s localmodule --skip-vendor .
.PHONY: imports
verify: verify-yaml verify-update
.PHONY: verify
verify-yaml:
hack/verify-yaml.sh
.PHONY: verify-yaml
verify-update: imports update
git diff --exit-code HEAD
.PHONY: verify-update
clean:
rm -rf _output/
.PHONY: clean