-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathMakefile
More file actions
48 lines (39 loc) · 1.45 KB
/
Makefile
File metadata and controls
48 lines (39 loc) · 1.45 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
# SPDX-FileCopyrightText: 2026 Comcast Cable Communications Management, LLC
# SPDX-License-Identifier: Apache-2.0
.PHONY: test test-unit test-integration test-all clean
# IMPORTANT: -tags="" is explicitly set to exclude files with build tags
# Without this flag, Go may include integration test files despite having //go:build integration tags
# Run unit tests only (excludes integration tests via build tags)
test-unit:
@echo "Running unit tests..."
@go test -v -tags="" -timeout=30s ./...
# Run integration tests only
test-integration:
@echo "Running integration tests..."
@go test -v -tags=integration -timeout=10m ./...
# Run all tests (unit + integration)
test-all: test-unit test-integration
# Default test target (unit tests only)
test: test-unit
# Clean test cache and build artifacts
clean:
@go clean -testcache
@rm -f talaria_test talaria *_test.yaml
@echo "Cleaned test cache and build artifacts"
# Build the application
build:
@go build -o talaria .
# Run linter
lint:
@./lint.sh
# Help target
help:
@echo "Available targets:"
@echo " test - Run unit tests (default)"
@echo " test-unit - Run unit tests only"
@echo " test-integration - Run integration tests only"
@echo " test-all - Run both unit and integration tests"
@echo " build - Build the talaria binary"
@echo " lint - Run linter"
@echo " clean - Clean test cache and artifacts"
@echo " help - Show this help message"