-
-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathTaskfile.yml
More file actions
111 lines (94 loc) · 3.13 KB
/
Copy pathTaskfile.yml
File metadata and controls
111 lines (94 loc) · 3.13 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
version: "3"
tasks:
default:
desc: List available tasks
cmds:
- task --list
test:
desc: Run all tests
cmds:
- uv run pytest tests/ -q
test-unit:
desc: Run unit tests
cmds:
- uv run pytest tests/unit/ -v
test-integration:
desc: Run integration tests
cmds:
- uv run pytest tests/integration/ -v
test-fast:
desc: Run fast unit and integration tests
cmds:
- uv run pytest tests/unit/ tests/integration/ -m "not slow" --timeout=120 -q
test-parallel:
desc: Run fast unit and integration tests with pytest-xdist
cmds:
- uv run pytest tests/unit/ tests/integration/ -m "not slow" --timeout=120 -n 4 -q
lint:
desc: Run ruff linter
cmds:
- uv run ruff check proxywhirl/ tests/
format:
desc: Format code with ruff
cmds:
- uv run ruff format proxywhirl/ tests/
type-check:
desc: Run ty type checking
cmds:
- uv run ty check proxywhirl/
quality-gates:
desc: Run lint, type check, fast tests, and coverage
cmds:
- task lint
- task type-check
- task test-fast
- task coverage
coverage:
desc: Run core library coverage measurement
cmds:
- |
uv run pytest \
tests/unit/ \
tests/integration/ \
-m "not slow" \
--cov=proxywhirl.models \
--cov=proxywhirl.strategies \
--cov=proxywhirl.rotator \
--cov=proxywhirl.storage \
--cov=proxywhirl.utils \
--cov=proxywhirl.fetchers \
--cov=proxywhirl.sources \
--cov=proxywhirl.exceptions \
--cov-report=term-missing \
--cov-report=html:logs/htmlcov \
--cov-report=xml \
--cov-report=json:coverage.json \
--cov-fail-under=90 \
--timeout=120 \
-q \
--tb=line
validate-sources:
desc: Validate proxy source URLs
cmds:
- uv run python -c "from proxywhirl.sources import validate_sources_sync; report = validate_sources_sync(timeout=5, concurrency=20); print(f'{report.healthy_sources}/{report.total_sources} sources healthy')"
validate-sources-ci:
desc: Strict source validation for CI
cmds:
- uv run python -c "from proxywhirl.sources import validate_sources_sync; report = validate_sources_sync(timeout=5, concurrency=5); print(f'{report.healthy_sources}/{report.total_sources} sources healthy'); raise SystemExit(0 if report.all_healthy else 1)"
sources-list:
desc: List configured proxy sources
cmds:
- uv run python -c "from proxywhirl.sources import ALL_SOURCES; [print(source.url) for source in ALL_SOURCES]"
docs-html:
desc: Build Next.js/Fumadocs documentation
cmds:
- pnpm --dir web run build
docs-linkcheck:
desc: Verify generated documentation pipeline
cmds:
- pnpm --dir web run docs:generate
- pnpm --dir web run lint
docs-clean:
desc: Clean documentation build artifacts
cmds:
- uv run python -c "import shutil; shutil.rmtree('web/.next', ignore_errors=True); shutil.rmtree('web/.source', ignore_errors=True); shutil.rmtree('docs/build', ignore_errors=True)"