-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathjustfile
More file actions
37 lines (29 loc) · 832 Bytes
/
justfile
File metadata and controls
37 lines (29 loc) · 832 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
# Displays this help message
help:
@echo "Available commands:"
@just --list
# Runs all tests
test: unit-test e2e-test
# Runs all in-code, unit tests
unit-test:
go test ./...
e2e-test:
@echo "Nothing to e2e test yet ..."
# Lints Go code via golangci-lint within Docker
lint:
docker run \
-t \
--rm \
-v "$(pwd)/:/app" \
-w /app \
golangci/golangci-lint:v1.60 \
golangci-lint run -v
# Formats Go code via goimports
format:
find . -type f -name "*.go" -exec goimports -local github.com/open-sauced/pizza-cli -w {} \;
# Installs the dev tools for working with this project. Requires "go", "just", and "docker"
install-dev-tools:
#!/usr/bin/env sh
go install golang.org/x/tools/cmd/goimports@latest
# Runs all the dev tasks (like formatting, linting, building, etc.)
dev: format lint test