-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTaskfile.yml
82 lines (68 loc) · 2.06 KB
/
Taskfile.yml
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
version: "3"
tasks:
default:
deps: [test]
test:
deps: [buf:generate]
cmds:
- gotestsum -- -short -coverprofile=coverage.out {{or .CLI_ARGS "./..."}} | grep -v "/gen/"
test:watch:
desc: (Re)run (Go) tests automatically when files change
cmds:
- gotestsum --watch --format=short --format-hide-empty-pkg --format-hivis --post-run-command 'echo -e "\\n 🔹🔹🔹"'
buf:generate:
desc: Generate protobuf
cmds:
- buf generate
lint:
deps: [buf:generate]
desc: Lint all source code
cmds:
- golangci-lint run --fix --timeout 10m
fmt:
desc: Format all source code
cmds:
- prettier --write '**/**.{ts,js,md,yaml,yml,sass,css,scss,html}'
- golines --max-len=88 --base-formatter=gofumpt -w --ignored-dirs="vendor" .
dev:
desc: Run envoy-oidc-authserver and restart on source changes
cmds:
- watchexec --clear --restart --stop-signal INT --debounce 300ms -- task dev:server
dev:gen-tls:
desc: Generate TLS certificates
cmds:
- ls *.pem || mkcert localhost
dev:server:
desc: Run envoy-oidc-authserver for local development
deps: [buf:generate, dev:gen-tls]
env:
OTEL_EXPORTER_OTLP_ENDPOINT: http://localhost:4317
ENVOY_AUTHZ_SECRET_KEY: "G_TdvPJ9T8C4p&A?Wr3YAUYW$*9vn4?t"
ENVOY_AUTHZ_REDIS_URL: "redis:///0?tracing=true"
ENVOY_AUTHZ_PROVIDERS_CONFIG: run/config/providers.yaml
ENVOY_AUTHZ_TLS_SERVER_CERT_FILE: localhost.pem
ENVOY_AUTHZ_TLS_SERVER_KEY_FILE: localhost-key.pem
ENVOY_AUTHZ_LOG_LEVEL: debug
cmds:
- go run .
dev:deps:
desc: run envoy, dex, otel and podinfo container for local development and testing
cmds:
- podman compose up --detach
tidy:
cmds:
- go mod tidy
update:
desc: Update all dependencies
cmds:
- task: update:nix-pkgs
- task: update:go-deps
update:go-deps:
desc: Update go dependencies
cmds:
- go get -u ./...
- task: tidy
update:nix-pkgs:
desc: Update nix flake packages
cmds:
- nix flake update