-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yml
More file actions
97 lines (81 loc) · 2.56 KB
/
Taskfile.yml
File metadata and controls
97 lines (81 loc) · 2.56 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
version: "3"
tasks:
default:
desc: Show available tasks
cmds:
- task --list
setup:
desc: Install dev environment and pre-commit hooks
cmds:
- uv lock --check || uv lock
- uv sync --group dev
- prek install || pre-commit install
update:
desc: Bump every hook's pinned tool version + dev deps + pre-commit revs
cmds:
- task: update:versions
- task: fetch-checksums
- uv sync --group dev --upgrade
- prek autoupdate || pre-commit autoupdate
update:versions:
desc: Bump hooks/*/version.txt to latest upstream release
cmds:
- uv run python scripts/bump_versions.py {{.CLI_ARGS}}
update:versions:check:
desc: Show pending tool version bumps without writing
cmds:
- uv run python scripts/bump_versions.py --dry-run
lint:
desc: Ruff + mypy + bash -n on every hook run.sh
cmds:
- uv run ruff check .
- uv run ruff format --check .
- uv run mypy lib tests scripts
- bash -c 'set -e; for s in lib/*.sh hooks/*/run.sh; do bash -n "$s"; done; echo "shell syntax ok"'
format:
desc: Apply ruff formatting
cmds:
- uv run ruff check --fix .
- uv run ruff format .
test:
desc: Run pytest + per-hook smoke
cmds:
- task: test:unit
- task: test:hooks
test:unit:
desc: Run pytest unit tests
cmds:
- uv run pytest tests/ -v
test:hooks:
desc: Smoke-test each hook via prek try-repo against its tests/ fixtures
cmds:
- bash scripts/smoke_hooks.sh
cov:
desc: Run pytest with branch coverage (gate set in pyproject.toml)
cmds:
- uv run pytest --cov --cov-branch --cov-report=term-missing
audit:
desc: pip-audit + bandit
cmds:
- uv export --no-emit-project --no-hashes --frozen --format requirements-txt -o /tmp/kreuzberg-hooks-requirements.txt
- uv run pip-audit --strict --no-deps --disable-pip -r /tmp/kreuzberg-hooks-requirements.txt
- uv run bandit -c pyproject.toml -r lib scripts
fetch-checksums:
desc: Populate real sha256s in every hook's checksums.txt from upstream releases
cmds:
- uv run python scripts/fetch_checksums.py
ci:
desc: Full CI pass (lint + cov + audit + hook smoke)
cmds:
- task: lint
- task: cov
- task: audit
- task: test:hooks
validate:
desc: Alias for ci
cmds:
- task: ci
release:
desc: Cut a release (placeholder — handled by .github/workflows/release.yml on tag push)
cmds:
- echo "Tag with 'git tag vX.Y.Z && git push --tags' — release.yml does the rest."