-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
60 lines (47 loc) · 1.22 KB
/
justfile
File metadata and controls
60 lines (47 loc) · 1.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
# blob-cli build tasks
set shell := ["bash", "-euo", "pipefail", "-c"]
# Binary name
binary := "blob"
# Default recipe: validate code
default: fmt vet lint test
# CI recipe: full validation pipeline
ci: fmt vet lint test build
# Format check (fails if code needs formatting)
fmt:
@echo "Checking formatting..."
@test -z "$(gofmt -l .)" || (echo "Files need formatting:"; gofmt -l .; exit 1)
# Run go vet
vet:
@echo "Running go vet..."
go vet ./...
# Run golangci-lint
lint:
@echo "Running golangci-lint..."
golangci-lint run
# Run tests
test:
@echo "Running tests..."
go test -race -cover ./...
# Run integration tests (requires Docker)
test-integration:
@echo "Running integration tests..."
go test -v -tags=integration ./integration/...
# Build the binary
build:
@echo "Building..."
go build -o {{binary}} .
# Install development tools
tools:
@echo "Installing development tools..."
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
# Format code (modifies files)
fmt-write:
@echo "Formatting code..."
gofmt -w .
# Clean build artifacts
clean:
@echo "Cleaning build artifacts..."
rm -f {{binary}}
# Show available recipes
help:
@just --list