-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathMakefile
More file actions
76 lines (59 loc) · 1.69 KB
/
Copy pathMakefile
File metadata and controls
76 lines (59 loc) · 1.69 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
all: interlink vk installer ssh-tunnel
interlink:
CGO_ENABLED=0 OOS=linux go build -o bin/interlink cmd/interlink/main.go cmd/interlink/cri.go
vk:
CGO_ENABLED=0 OOS=linux go build -o bin/vk cmd/virtual-kubelet/main.go
installer:
CGO_ENABLED=0 OOS=linux go build -o bin/installer cmd/installer/main.go
ssh-tunnel:
CGO_ENABLED=0 OOS=linux go build -o bin/ssh-tunnel cmd/ssh-tunnel/main.go
openapi:
go run cmd/openapi-gen/main.go
clean:
rm -rf ./bin
# Code quality checks
lint:
golangci-lint run -v --timeout=30m
unit-test:
go test -v -race -coverprofile=coverage.out -covermode=atomic ./pkg/...
# Run all checks before integration tests
check: lint unit-test
@echo "All checks passed!"
test:
dagger call -m ./ci \
--name my-tests \
build-images \
new-interlink \
test stdout
test-tls:
dagger call -m ./ci \
--name my-mtls-tests \
build-images \
new-interlink-mtls \
test stdout
# Quick local integration test
test-local: all
@echo "Running local integration test..."
@./scripts/local-test.sh
# K3s-based integration tests (individual steps)
test-k3s-setup:
@echo "Setting up K3s test environment..."
@bash ./scripts/k3s-test-setup.sh
test-k3s-run:
@echo "Running K3s integration tests..."
@bash ./scripts/k3s-test-run.sh
test-k3s-cleanup:
@echo "Cleaning up K3s test environment..."
@bash ./scripts/k3s-test-cleanup.sh
# Complete K3s integration test cycle
test-k3s:
@status=0; \
$(MAKE) test-k3s-setup || status=$$?; \
if [ $$status -eq 0 ]; then \
$(MAKE) test-k3s-run || status=$$?; \
fi; \
$(MAKE) test-k3s-cleanup || cleanup_status=$$?; \
if [ $$status -eq 0 ] && [ -n "$$cleanup_status" ]; then \
status=$$cleanup_status; \
fi; \
exit $$status