-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
83 lines (69 loc) · 2.22 KB
/
Makefile
File metadata and controls
83 lines (69 loc) · 2.22 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
76
77
78
79
80
81
82
83
# Makefile for ollamacode Go project
.PHONY: build clean test test-unit test-service test-integration test-all run format lint install help
# Default target
all: build
# Build the project
build:
@echo "Building..."
go build -o build/DevCode .
# Clean build artifacts
clean:
@echo "Cleaning..."
rm -rf build/
go clean
# Run all tests (unit tests only, excluding integration)
test:
@echo "Running unit tests from src directory..."
go test -v ./...
@echo "Running unit tests from tests directory..."
cd tests && go test -v -run "^Test[^I]|^Test$$" ./...
# Run only unit tests (src directory)
test-unit:
@echo "Running unit tests from src directory..."
go test -v ./...
# Run only service unit tests (tests directory, excluding integration)
test-service:
@echo "Running service unit tests..."
cd tests && go test -v -run "^Test[^I]|^Test$$" ./...
# Run only integration tests (tests directory)
test-integration:
@echo "Running integration tests..."
cd tests && go test -v -run ".*Integration" ./...
# Run all tests including integration tests
test-all:
@echo "Running all unit tests..."
go test -v ./...
@echo "Running all tests in tests directory..."
cd tests && go test -v ./...
# Run the application
run:
@echo "Running application..."
go run ./...
# Format code
format:
@echo "Formatting code..."
go fmt ./...
# Lint code
lint:
@echo "Linting code..."
go vet ./...
# Install dependencies
install:
@echo "Installing dependencies..."
go mod tidy
go mod download
# Show help
help:
@echo "Available targets:"
@echo " build - Build the project"
@echo " clean - Clean build artifacts"
@echo " test - Run unit tests only (excluding integration)"
@echo " test-unit - Run only unit tests (src directory)"
@echo " test-service - Run only service unit tests (tests directory, no integration)"
@echo " test-integration - Run only integration tests (tests directory)"
@echo " test-all - Run all tests including integration tests"
@echo " run - Run the application"
@echo " format - Format source code"
@echo " lint - Lint source code"
@echo " install - Install dependencies"
@echo " help - Show this help message"