-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
executable file
·90 lines (70 loc) · 1.65 KB
/
Copy pathjustfile
File metadata and controls
executable file
·90 lines (70 loc) · 1.65 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
84
85
86
87
88
89
90
# Run go mod tidy
tidy:
go mod tidy
# Apply go fix to update deprecated API usage
fix:
go fix ./...
# Run go generate
generate:
go generate ./...
# Build the sigillum binary
[default]
build: tidy generate
go build -o bin/'sigillum' ./cmd/'sigillum'
# Build a snapshot release with goreleaser
snapshot:
goreleaser build --snapshot --clean
# Run golangci-lint
lint:
golangci-lint run
# Run golangci-lint with auto-fix
lint-fix:
golangci-lint run --fix
# Run Go tests with coverage
test:
go test ./... -v -cover
# Run Go tests with race detector
test-race:
go test -race ./...
# Run integration tests
test-integration:
INT_TEST=1 go test ./... -v
# Run the Godog behaviour suite (drives the built binary)
test-e2e:
INT_TEST_E2E=1 go test ./test/e2e/... -v -timeout 10m
# Generate HTML coverage report and open it
coverage:
go test ./... -coverprofile=coverage.out
go tool cover -html=coverage.out -o coverage.html
open coverage.html
# Run benchmarks
bench:
go test -bench=. -benchmem ./...
# Run pre-commit checks
check:
pre-commit run --all-files
# Regenerate all mocks
mocks:
mockery
# Check for vulnerabilities in dependencies
vuln:
govulncheck ./...
# Find unreachable exported symbols
deadcode:
deadcode ./...
# Install the sigillum binary to $GOPATH/bin
install:
go install ./cmd/'sigillum'
# Serve documentation locally
docs-serve:
zensical serve
# Run the full local CI suite
ci: tidy generate test test-race lint
@echo "CI suite passed"
# Cleanup build artifacts
cleanup:
rm -rf bin
rm -rf site
rm -rf .cache
rm -rf dist
rm -f coverage.out coverage.html