forked from kyma-project/hydroform
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
67 lines (54 loc) · 1.63 KB
/
Makefile
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
58
59
60
61
62
63
64
65
66
67
mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST)))
mkfile_dir := $(dir $(mkfile_path))
.PHONY: build
build:
./provision/before-commit.sh ci
./install/before-commit.sh ci
./parallel-install/before-commit.sh ci
./function/before-commit.sh ci
.PHONY: ci-pr
ci-pr: build
.PHONY: ci-main
ci-main: build
.PHONY: ci-release
ci-release: build
.PHONY: lint-function
lint-function:
./hack/verify-lint.sh $(mkfile_dir)/function
.PHONY: lint-provision
lint-provision:
./hack/verify-lint.sh $(mkfile_dir)/provision
.PHONY: lint-install
lint-install:
./hack/verify-lint.sh $(mkfile_dir)/install
.PHONY: lint-parallel-install
lint-parallel-install:
./hack/verify-lint.sh $(mkfile_dir)/parallel-install
.PHONY: lint
lint: lint-function lint-provision lint-install lint-parallel-install
.PHONY: test-provision
test-provision:
@cd provision; \
echo "Running tests for provision"; \
go test -coverprofile=cover.out ./... ;\
echo "Total test coverage: $$(go tool cover -func=cover.out | grep total | awk '{print $$3}')" ;\
rm cover.out ; \
cd ..;
.PHONY: test-install
test-install:
@cd install; \
echo "Running tests for install"; \
go test -coverprofile=cover.out ./... ;\
echo "Total test coverage: $$(go tool cover -func=cover.out | grep total | awk '{print $$3}')" ;\
rm cover.out ; \
cd ..;
.PHONY: test-parallel-install
test-parallel-install:
@cd parallel-install; \
echo "Running tests for parallel-install"; \
go test -coverprofile=cover.out ./... ;\
echo "Total test coverage: $$(go tool cover -func=cover.out | grep total | awk '{print $$3}')" ;\
rm cover.out ; \
cd ..;
.PHONY: test
test: test-provision test-install test-parallel-install