-
Notifications
You must be signed in to change notification settings - Fork 108
/
Copy pathJustfile
59 lines (47 loc) · 1.87 KB
/
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
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
set dotenv-load
default:
@just --list
pre-commit: tidy generate lint export-docs-events openapi generate-client
pc: pre-commit
lint:
@golangci-lint run --fix --build-tags it --timeout 5m
@for d in $(ls tools); do \
pushd tools/$d; \
golangci-lint run --fix --build-tags it --timeout 5m; \
popd; \
done
@cd {{justfile_directory()}}/deployments/pulumi && golangci-lint run --fix --build-tags it --timeout 5m
tidy:
@for d in $(ls tools); do \
pushd tools/$d; \
go mod tidy; \
popd; \
done
@go mod tidy
@cd {{justfile_directory()}}/deployments/pulumi && go mod tidy
@cd {{justfile_directory()}}/test/performance && go mod tidy
generate:
@rm $(find ./internal -name '*_generated_test.go') || true
@go generate ./...
g: generate
export-docs-events:
@go run . docs events --write-dir docs/events
tests:
@go test -race -covermode=atomic \
-coverpkg=github.com/formancehq/ledger/internal/...,github.com/formancehq/ledger/pkg/events/...,github.com/formancehq/ledger/pkg/accounts/...,github.com/formancehq/ledger/pkg/assets/...,github.com/formancehq/ledger/cmd/... \
-coverprofile coverage.txt \
-tags it \
./...
@cat coverage.txt | grep -v debug.go | grep -v "/machine/" > coverage2.txt
@mv coverage2.txt coverage.txt
openapi:
@yq eval-all '. as $item ireduce ({}; . * $item)' openapi/v1.yaml openapi/v2.yaml openapi/overlay.yaml > openapi.yaml
@npx -y widdershins {{justfile_directory()}}/openapi/v2.yaml -o {{justfile_directory()}}/docs/api/README.md --search false --language_tabs 'http:HTTP' --summary --omitHeader
generate-client: openapi
@cd pkg/client && speakeasy run --skip-versioning
release-local:
@goreleaser release --nightly --skip=publish --clean
release-ci:
@goreleaser release --nightly --clean
release:
@goreleaser release --clean