-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
64 lines (52 loc) · 1.06 KB
/
justfile
File metadata and controls
64 lines (52 loc) · 1.06 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
# List available recipes
default:
@just --list
# Build the binary
[group: 'build']
build:
go build -v ./...
# Run all tests
[group: 'test']
test:
go test -v ./...
# Run tests with coverage
[group: 'test']
test-coverage:
go test -coverprofile=coverage.out ./...
go tool cover -func=coverage.out
# Run tests with coverage and open HTML report
[group: 'test']
test-coverage-html: test-coverage
go tool cover -html=coverage.out
# Format code
[group: 'quality']
fmt:
go fmt ./...
# Run static analysis
[group: 'quality']
vet:
go vet ./...
# Tidy module dependencies
[group: 'quality']
tidy:
go mod tidy
# Run all checks (fmt, vet, test)
[group: 'quality']
check: fmt vet test
# Generate the binary locally
[group: 'build']
bin:
go build -o ghat .
# Build a snapshot release locally with goreleaser
[group: 'build']
snapshot:
goreleaser build --snapshot --clean
# Run the binary with arguments
[group: 'dev']
run *ARGS:
go run . {{ARGS}}
# Clean build artifacts
[group: 'dev']
clean:
rm -f ghat coverage.out
rm -rf dist/