forked from first-fluke/fullstack-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmise.toml
More file actions
94 lines (78 loc) · 3.53 KB
/
mise.toml
File metadata and controls
94 lines (78 loc) · 3.53 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
experimental_monorepo_root = true
[settings]
experimental = true
[tools]
node = "24"
python = "3.12"
pnpm = "10"
uv = "latest"
flutter = "3"
terraform = "1"
hadolint = "latest"
"github:Infisical/cli" = "latest"
[tasks]
"db:migrate" = { depends = ["//apps/api:migrate"], description = "Run database migrations" }
dev = { depends = ["//apps/api:dev", "//apps/web:dev", "//apps/worker:dev"], description = "Start all services" }
format = { depends = ["//apps/api:format", "//apps/web:format", "//apps/worker:format"], description = "Format all apps" }
"gen:api" = { run = "mise //apps/api:gen:openapi && mise //apps/web:gen:api", description = "Generate OpenAPI schema and API clients" }
"i18n:build" = { depends = ["//packages/i18n:build"], description = "Build i18n files" }
"infra:down" = { depends = ["//apps/api:infra:down"], description = "Stop local infrastructure" }
"infra:up" = { depends = ["//apps/api:infra:up"], description = "Start local infrastructure" }
install = { depends = ["//apps/web:install", "//apps/api:install", "//apps/worker:install", "//apps/mobile:install", "//packages/design-tokens:install", "//packages/i18n:install"], description = "Install all dependencies" }
lint = { depends = ["//apps/api:lint", "//apps/web:lint", "//apps/worker:lint"], description = "Lint all apps" }
test = { depends = ["//apps/api:test", "//apps/web:test", "//apps/worker:test"], description = "Test all apps" }
"tokens:build" = { depends = ["//packages/design-tokens:build"], description = "Build design tokens" }
typecheck = { depends = ["//apps/api:typecheck", "//apps/web:typecheck"], description = "Type check all apps" }
[tasks."git:commit-msg"]
description = "Validate commit message using commitlint"
run = "pnpm dlx @commitlint/cli@20 --edit $1"
[tasks."git:pre-commit"]
description = "Run conditional checks for staging files"
run = '''
#!/usr/bin/env bash
changed=$(git diff --cached --name-only)
if echo "$changed" | grep -q "^apps/api/"; then
echo "[pre-commit] apps/api detected, running lint..."
mise //apps/api:lint || exit 1
fi
if echo "$changed" | grep -q "^apps/web/"; then
echo "[pre-commit] apps/web detected, running lint..."
mise //apps/web:lint || exit 1
fi
if echo "$changed" | grep -q "^apps/worker/"; then
echo "[pre-commit] apps/worker detected, running lint..."
mise //apps/worker:lint || exit 1
fi
if echo "$changed" | grep -q "^apps/mobile/"; then
echo "[pre-commit] apps/mobile detected, running lint..."
mise //apps/mobile:lint || exit 1
fi
if echo "$changed" | grep -qE "Dockerfile$"; then
echo "[pre-commit] Dockerfile detected, running hadolint..."
echo "$changed" | grep -E "Dockerfile$" | xargs hadolint || exit 1
fi
'''
[tasks."git:pre-push"]
description = "Validate branch name and run tests before push"
run = '''
#!/usr/bin/env bash
pnpm dlx @gracefullight/validate-branch || exit 1
# Get changed files compared to origin
changed=$(git diff --name-only origin/main...HEAD 2>/dev/null || git diff --name-only HEAD~1)
if echo "$changed" | grep -q "^apps/api/"; then
echo "[pre-push] apps/api detected, running test..."
mise //apps/api:test || exit 1
fi
if echo "$changed" | grep -q "^apps/web/"; then
echo "[pre-push] apps/web detected, running test..."
mise //apps/web:test || exit 1
fi
if echo "$changed" | grep -q "^apps/worker/"; then
echo "[pre-push] apps/worker detected, running test..."
mise //apps/worker:test || exit 1
fi
if echo "$changed" | grep -q "^apps/mobile/"; then
echo "[pre-push] apps/mobile detected, running test..."
mise //apps/mobile:test || exit 1
fi
'''