-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathTaskfile.yml
More file actions
102 lines (85 loc) · 1.93 KB
/
Taskfile.yml
File metadata and controls
102 lines (85 loc) · 1.93 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
version: '3'
vars:
PACKAGE: agent_actions
tasks:
# Setup
dev:
desc: Install in dev mode
cmds:
- uv sync --dev
# Quality
lint:
desc: Lint with ruff
cmds:
- uv run ruff check {{.PACKAGE}}
format:
desc: Format with ruff
cmds:
- uv run ruff format {{.PACKAGE}} tests
format:check:
desc: Check formatting
cmds:
- uv run ruff format --check {{.PACKAGE}} tests
mypy:
desc: Type check
cmds:
- uv run mypy {{.PACKAGE}}
check:
desc: Run all checks (lint + types + format)
cmds:
- task: lint
- task: mypy
- task: format:check
# Testing
test:
desc: Run tests
cmds:
- uv run pytest
test:coverage:
desc: Run tests with coverage
cmds:
- uv run pytest --cov={{.PACKAGE}} --cov-report=term-missing
test:fast:
desc: Run tests in parallel
cmds:
- uv run pytest -n auto
# Build
build:
desc: Build package
cmds:
- rm -rf dist build *.egg-info
- uv build
# Changelog (requires changie: https://changie.dev)
changelog:new:
desc: Create a changelog entry (run before every PR)
cmds:
- changie new
changelog:batch:
desc: Batch unreleased changes into a version
cmds:
- changie batch {{.CLI_ARGS}}
changelog:merge:
desc: Merge all versions into CHANGELOG.md
cmds:
- changie merge
changelog:check:
desc: Verify unreleased changelog entries exist
cmds:
- |
if [ -z "$(ls .changes/unreleased/*.yaml 2>/dev/null)" ]; then
echo "No unreleased changelog entries found."
echo "Run 'task changelog:new' to create one."
exit 1
fi
echo "Found changelog entries:"
ls .changes/unreleased/*.yaml
# Hooks
hooks:install:
desc: Install pre-commit hooks
cmds:
- uv run pre-commit install
# Default
default:
desc: Show available tasks
cmds:
- task --list