-
Notifications
You must be signed in to change notification settings - Fork 5
/
justfile
31 lines (26 loc) · 845 Bytes
/
justfile
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
default:
@just --list
# build saf binary
build:
go build -o saf ./cmd/saf
# update go packages
update:
@cd ./cmd/saf && go get -u
# set up the dev environment with docker-compose
dev cmd *flags:
#!/usr/bin/env bash
set -euxo pipefail
if [ {{ cmd }} = 'down' ]; then
docker compose -f ./deployments/docker-compose.yml down
docker compose -f ./deployments/docker-compose.yml rm
elif [ {{ cmd }} = 'up' ]; then
docker compose -f ./deployments/docker-compose.yml up -d {{ flags }}
else
docker compose -f ./deployments/docker-compose.yml {{ cmd }} {{ flags }}
fi
# run tests in the dev environment
test $saf_telemetry__meter__enabled="false": (dev "up")
go test -v ./... -covermode=atomic -coverprofile=coverage.out
# run golangci-lint
lint:
golangci-lint run -c .golangci.yml