-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathjustfile
More file actions
38 lines (31 loc) · 778 Bytes
/
justfile
File metadata and controls
38 lines (31 loc) · 778 Bytes
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
build:
go build
# Build optimized binary for releases (respects GOOS and GOARCH env vars)
build-release:
go build -ldflags="-s -w" -trimpath
run *args: build
GO_LOG=debug ./rtask {{args}}
# Download and verify dependencies
deps:
go mod download
go mod verify
# Run tests with race detection and coverage
test:
go test -v -race -timeout 5m -coverprofile=coverage.out -covermode=atomic
go tool cover -func=coverage.out
# Run linters
lint:
go vet ./...
gofmt -l .
staticcheck
# Check code formatting (fail if not formatted)
fmt-check:
#!/usr/bin/env bash
set -euo pipefail
if [ -n "$(gofmt -l .)" ]; then
echo "Go code is not formatted:"
gofmt -d .
exit 1
fi
# Full CI check (what runs in GitHub Actions)
ci: deps lint fmt-check test