-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathTaskfile.yml
More file actions
110 lines (91 loc) · 2.83 KB
/
Taskfile.yml
File metadata and controls
110 lines (91 loc) · 2.83 KB
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
version: "3"
run: once
vars:
WEB_PORT: "{{.WEB_PORT | default 5223}}"
GATEWAY_PORT: "{{.GATEWAY_PORT | default 8447}}"
MOCK_OAUTH_PORT: "{{.MOCK_OAUTH_PORT | default 3345}}"
includes:
docker: ./taskfiles/Taskfile.docker.yml
go: ./taskfiles/Taskfile.go.yml
web: ./web/Taskfile.yml
mock-oauth: ./mock-oauth/Taskfile.yml
db: ./taskfiles/Taskfile.db.yml
tasks:
ci:
desc: "Runs everything that runs on CI: linters, codegen, tests, build, quality checks"
cmds:
- task: lint:fix
- task: duplication
- task: file-length
- task: shellcheck
- task: web:check-ignores
- task: build
- task: generate:test
duplication:
desc: Check for code duplication (zero tolerance for Go and TypeScript)
deps: [go:duplication, web:duplication]
file-length:
desc: Check file length limits (max 500 for code, 1000 for tests - Go and TypeScript)
cmds:
- scripts/check_file_length.sh
shellcheck:
desc: Check all shell scripts with shellcheck
cmds:
- git ls-files "*.sh" | xargs shellcheck
format:
desc: Format Go, web, and mock OAuth code
deps: [go:format, web:format, mock-oauth:format]
lint:
desc: Run web + Go linters and typecheck
deps: [web:lint, go:lint, mock-oauth:lint]
lint:fix:
desc: Run web + Go linters and typecheck
deps: [web:lint:fix, go:lint:fix, mock-oauth:lint:fix]
generate:
desc: Regenerate swagger and types from Go, then web OpenAPI schema and client
cmds:
- task go:generate
- task web:generate
test:
desc: Run all tests
deps: [go:test, web:test, mock-oauth:test]
cmds:
- task: web:e2e
- task: go:e2e
generate:test:
desc: Run code generation and tests. Can run all the go tasks in parallel.
deps: [go:test, go:sec:vuln, go:generate]
cmds:
- task: web:test
- task: mock-oauth:test
- task: go:e2e
- task: web:e2e
e2e:
desc: Run all E2E tests
cmds:
- task: web:e2e
- task: go:e2e
build:
desc: Build web + gateway + cli + mock binaries
deps: [web:build, go:build, mock-oauth:build]
# Local development (Procfile-based, only Postgres and MinIO in Docker)
dev:
desc: Start Postgres and MinIO in Docker, then run all services locally via overmind
deps: [db:migrate]
cmds:
- docker compose up -d minio minio-setup
- overmind start -f Procfile.dev
# Docker-based development stack (everything in containers)
dev:docker:
desc: Start full dev stack in Docker and follow logs
deps: [docker:dev:start]
logs:
desc: Tail logs for the dev stack
deps: [docker:dev:logs]
preview:
desc: Start preview stack and follow logs
deps: [docker:preview:start]
dev-setup:
desc: Install development dependencies (task, bun, air, goimports, libfido2)
cmds:
- scripts/dev-setup.sh