-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yml
More file actions
92 lines (78 loc) · 2.55 KB
/
Copy pathTaskfile.yml
File metadata and controls
92 lines (78 loc) · 2.55 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
version: "3"
silent: true
env:
UV_FROZEN: "1"
tasks:
default:
desc: List available tasks
cmds:
- task --list
dev:lint:
desc: Run ruff check
cmds:
- uv run ruff check src tests
dev:fmt:
desc: Apply ruff format
cmds:
- uv run ruff format src tests
dev:fmt-check:
desc: Check formatting without rewriting
cmds:
- uv run ruff format --check src tests
dev:typecheck:
desc: Run ty type checker
cmds:
- uv run ty check src
dev:test:
desc: Run the pytest suite
cmds:
- uv run pytest
dev:check:
desc: Full quality gate — lint, format-check, typecheck, tests
cmds:
- task: dev:lint
- task: dev:fmt-check
- task: dev:typecheck
- task: dev:test
# Two separate traps, both of which produce a silent no-op rather than an
# error, so neither is visible without deliberately testing for it:
#
# 1. A task-level `env:` block does not win. Task will not override a
# variable already present in the OS environment, which is where mise
# puts UV_FROZEN. Hence `env -u`.
# 2. `env -u` alone is not enough either. If `uv` on PATH is a mise *shim*
# rather than the real binary, the shim re-derives [env] from mise.toml
# inside the child process and puts UV_FROZEN back after `env -u` has
# stripped it. `mise which` resolves past the shim to the real binary;
# `command -v` covers the case where uv is not mise-managed at all.
uv:lock:
desc: >-
Re-lock uv.lock. The only command that should change it; UV_FROZEN is "1"
elsewhere so nothing rewrites the lockfile as a side effect.
cmds:
- env -u UV_FROZEN "$(mise which uv 2>/dev/null || command -v uv)" lock
dev:hooks:
desc: Run all prek hooks against every file
cmds:
- prek run --all-files
dev:hooks-install:
desc: Install git hooks (pre-commit, commit-msg, pre-push)
cmds:
- prek install --hook-type pre-commit --hook-type commit-msg --hook-type pre-push
docs:dev:
desc: Run the Fumadocs site locally with hot reload at http://localhost:3000.
Strips the GitHub Pages basePath so assets resolve under root.
dir: docs/site
cmds:
- BASE_PATH= pnpm dev
docs:serve:
desc: Production-build the site without basePath and serve it locally.
dir: docs/site
cmds:
- BASE_PATH= SITE_URL=http://localhost:3000 pnpm build
- pnpm start
docs:build:
desc: Production build with the /python-template basePath, matching CI.
dir: docs/site
cmds:
- pnpm build