-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtasks.toml
More file actions
122 lines (103 loc) · 3.05 KB
/
tasks.toml
File metadata and controls
122 lines (103 loc) · 3.05 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
111
112
113
114
115
116
117
118
119
120
121
122
[all]
description = "Run all checks: lint, test, docs, audit"
depends = ["lint"]
run = """
mise run test
mise run docs
mise run audit
"""
[lint]
description = "Run linting and formatting checks"
run = """
uv run ruff check .
uv run ruff format --check .
uv run pyright --pythonversion $(cat .python-version) --threads
"""
[install]
description = "Install dev dependencies and pre-commit hooks"
run = """
uv tool install keyring --with keyrings.google-artifactregistry-auth
if [ -f uv.lock ]; then
uv sync --all-extras --frozen
else
uv sync --all-extras
fi
uv run pre-commit install
"""
[clean]
description = "Clean build artifacts and caches"
run = """
rm -rf .nox .pytest_cache .ruff_cache .venv .coverage
rm -rf dist && mkdir -p dist && touch dist/.keep
rm -rf reports && mkdir -p reports && touch reports/.keep
"""
[act]
description = "Run GitHub Actions locally via act"
run = """
act -j test --env-file .act-env-public --secret-file .act-env-secret \
--container-architecture linux/amd64 \
-P ubuntu-latest=catthehacker/ubuntu:act-latest \
--action-offline-mode --container-daemon-socket -
"""
[setup]
description = "Setup dev environment post project creation"
run = """
mise run install
uv run ruff format .
if [ -d .git ]; then
touch .act-env-secret
uv run pre-commit install
uv run detect-secrets scan > .secrets.baseline
git add .
uv run pre-commit || true
git add .
fi
"""
[update_from_template]
description = "Update from copier template"
run = """
copier update --trust --skip-answered --skip-tasks
mise run lint
mise run docs
mise run audit
"""
[test]
description = "Run tests (default: unit+integration+e2e)"
run = """
mise run test_unit
mise run test_integration
mise run test_e2e
"""
[test_unit]
description = "Run unit tests"
run = "XDIST_WORKER_FACTOR=0.0 uv run nox -s test -p $(cat .python-version) -- -m unit --cov-append"
[test_integration]
description = "Run integration tests"
run = "XDIST_WORKER_FACTOR=0.2 uv run nox -s test -p $(cat .python-version) -- -m integration --cov-append"
[test_e2e]
description = "Run e2e tests"
run = "XDIST_WORKER_FACTOR=1 uv run nox -s test -p $(cat .python-version) -- -m e2e --cov-append"
[test_scheduled]
description = "Run scheduled tests"
run = "uv run nox -s test -p $(cat .python-version) -- -m scheduled --cov-append"
[test_sequential]
description = "Run sequential tests"
run = "uv run nox -s test -p $(cat .python-version) -- -m sequential --cov-append"
[test_coverage_reset]
description = "Reset test coverage data"
run = "rm -rf .coverage reports/coverage*"
[audit]
description = "Run security and license compliance audit"
run = "uv run nox -s audit"
[docs]
description = "Generate ATTRIBUTIONS.md from license data"
run = "uv run nox -s docs"
[bump]
description = "Trigger the Release Bump workflow on GitHub Actions"
usage = 'arg "[cz_args]..." help="Arguments to pass to cz bump (e.g. --increment major --prerelease rc)"'
run = """
gh workflow run bump.yml -f arguments="${usage_cz_args:-}"
"""
[pre_commit_run_all]
description = "Run pre-commit hooks on all files"
run = "uv run pre-commit run --all-files"