-
Notifications
You must be signed in to change notification settings - Fork 55
Expand file tree
/
Copy pathTaskfile.yaml
More file actions
414 lines (361 loc) · 10.5 KB
/
Taskfile.yaml
File metadata and controls
414 lines (361 loc) · 10.5 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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
version: "3"
# ============================================================================
# KREUZBERG THIN ROUTER - html-to-markdown
# ============================================================================
# This is the root Taskfile that delegates all work to modular task files.
# Structure:
# - .task/config/vars.yml -> shared variables and platform detection
# - .task/config/platforms.yml -> platform-specific configuration
# - .task/languages/* -> language-specific build/test/lint tasks
# - .task/workflows/* -> aggregated multi-language workflows
# - .task/tools/* -> utility tasks (version sync, validation, etc.)
#
# Command patterns:
# task setup -> installs all dependencies
# task test -> runs all language tests
# task lint -> lints all languages with auto-fix
# task format:check -> checks format without modifications
# task rust:build -> language-specific tasks (delegated to .task/languages/rust.yml)
#
# ============================================================================
# === INCLUDES ===
includes:
# Internal configuration (not exposed as tasks)
_cfg:
taskfile: ./.task/config/vars.yml
internal: true
_platforms:
taskfile: ./.task/config/platforms.yml
internal: true
# Language modules (exposed with prefix: rust:*, python:*, node:*, etc.)
rust:
taskfile: ./.task/languages/rust.yml
python:
taskfile: ./.task/languages/python.yml
node:
taskfile: ./.task/languages/node.yml
typescript:
taskfile: ./.task/languages/typescript.yml
wasm:
taskfile: ./.task/languages/wasm.yml
ruby:
taskfile: ./.task/languages/ruby.yml
php:
taskfile: ./.task/languages/php.yml
go:
taskfile: ./.task/languages/go.yml
java:
taskfile: ./.task/languages/java.yml
csharp:
taskfile: ./.task/languages/csharp.yml
elixir:
taskfile: ./.task/languages/elixir.yml
r:
taskfile: ./.task/languages/r.yml
# Workflow aggregators (internal, used by root-level tasks)
_build:
taskfile: ./.task/workflows/build.yml
internal: true
_test:
taskfile: ./.task/workflows/test.yml
internal: true
_lint:
taskfile: ./.task/workflows/lint.yml
internal: true
optional: true
# Version sync workflow
version:
taskfile: ./.task/tools/version-sync.yml
# Documentation generation (exposed as docs:*)
docs:
taskfile: ./.task/tools/docs.yml
# General tools (flatten to expose pre-commit:*, toml:*, shell:*, etc. at root)
_tools:
taskfile: ./.task/tools/general.yml
flatten: true
# ============================================================================
# ROOT TASKS - PRIMARY DEVELOPMENT INTERFACE
# ============================================================================
tasks:
# Setup: Install all dependencies across all languages
setup:
desc: "Install all dependencies and setup development environment"
cmds:
- task: rust:install
- task: python:install
- task: node:install
- task: typescript:install
- task: wasm:install
- task: ruby:install
- task: php:install
- task: go:install
- task: java:install
- task: csharp:install
- task: elixir:install
- task: r:install
- task: pre-commit:install
# Build tasks: compile all languages
build:
desc: "Build all language bindings (default: release mode)"
cmds:
- task: _build:all
build:dev:
desc: "Build all in debug mode"
cmds:
- task: _build:all:dev
build:release:
desc: "Build all in release mode"
cmds:
- task: _build:all:release
build:ci:
desc: "Build all in CI mode"
cmds:
- task: _build:all:ci
build:core:
desc: "Build Rust core library only"
cmds:
- task: _build:core
build:bindings:
desc: "Build all language bindings (skip Rust core)"
cmds:
- task: _build:bindings
build:cli:
desc: "Build the html-to-markdown CLI binary"
cmds:
- task: rust:cli:build
# Test tasks: run all test suites
test:
desc: "Run all test suites across all languages"
cmds:
- task: _test:all
test:ci:
desc: "Run all tests with coverage (CI mode)"
cmds:
- task: _test:all:ci
# Lint tasks: linting with and without auto-fix
lint:
desc: "Lint all code WITH auto-fix enabled"
cmds:
- task: _lint:all
lint:check:
desc: "Lint all code WITHOUT auto-fix (check-only)"
cmds:
- task: _lint:check
# Format tasks: formatting with and without modifications
format:
desc: "Format all code (with modifications)"
cmds:
- task: _lint:format
format:check:
desc: "Check code formatting without modifications"
cmds:
- task: _lint:format:check
# Combined check: format + lint without modifications
check:
desc: "Run all checks (format + lint, no modifications)"
cmds:
- task: format:check
- task: lint:check
# Update dependencies: all languages
update:
desc: "Update all dependencies across all languages"
cmds:
- task: rust:update
- task: python:update
- task: node:update
- task: typescript:update
- task: wasm:update
- task: ruby:update
- task: php:update
- task: go:update
- task: java:update
- task: csharp:update
- task: elixir:update
- task: r:update
- uv tool update prek
- prek autoupdate
# Version synchronization: propagate version across all manifests
versions:sync:
desc: "Synchronize version from Cargo.toml to all package manifests"
cmds:
- task: version:sync
# Coverage tasks: generate coverage reports
cov:rust:
desc: "Generate Rust coverage report"
cmds:
- task: rust:coverage
cov:python:
desc: "Generate Python coverage report"
cmds:
- task: python:coverage
cov:all:
desc: "Generate coverage for all languages (Rust + Python)"
cmds:
- task: _test:coverage
# E2E tests for published packages
e2e:smoke:all:
desc: "Run smoke tests for all published packages (fast validation)"
cmds:
- task: e2e:smoke:python
- task: e2e:smoke:node
- task: e2e:smoke:ruby
- task: e2e:smoke:php
- task: e2e:smoke:go
- task: e2e:smoke:java
- task: e2e:smoke:csharp
- task: e2e:smoke:elixir
- task: e2e:smoke:r
e2e:smoke:python:
desc: "Smoke test Python package from PyPI"
dir: test_apps/python
cmds:
- uv sync
- uv run pytest smoke_test.py -v
e2e:smoke:node:
desc: "Smoke test Node package from npm"
dir: test_apps/node
cmds:
- pnpm install
- pnpm test:smoke
e2e:smoke:ruby:
desc: "Smoke test Ruby gem from RubyGems"
dir: test_apps/ruby
cmds:
- bundle install
- bundle exec rspec smoke_test.rb
e2e:smoke:php:
desc: "Smoke test PHP package from Packagist"
dir: test_apps/php
cmds:
- composer install
- vendor/bin/phpunit smoke_test.php
e2e:smoke:go:
desc: "Smoke test Go package from pkg.go.dev"
dir: test_apps/go
cmds:
- go mod download
- go test -v -run Smoke
e2e:smoke:java:
desc: "Smoke test Java package from Maven Central"
dir: test_apps/java
cmds:
- ./mvnw{{if eq .OS "windows"}}.cmd{{end}} clean install -DskipTests
- ./mvnw{{if eq .OS "windows"}}.cmd{{end}} test -Dtest=SmokeTest
e2e:smoke:csharp:
desc: "Smoke test C# package from NuGet"
dir: test_apps/csharp
cmds:
- dotnet restore
- dotnet test --filter FullyQualifiedName~SmokeTest
e2e:smoke:elixir:
desc: "Smoke test Elixir package from Hex.pm"
dir: test_apps/elixir
cmds:
- mix deps.get
- mix test test/smoke_test.exs
e2e:smoke:r:
desc: "Smoke test R package"
dir: test_apps/r
cmds:
- Rscript smoke_test.R
# Comprehensive e2e tests (post-release validation)
e2e:test:all:
desc: "Run comprehensive tests for all published packages"
cmds:
- task: e2e:test:python
- task: e2e:test:node
- task: e2e:test:ruby
- task: e2e:test:php
- task: e2e:test:go
- task: e2e:test:java
- task: e2e:test:csharp
- task: e2e:test:elixir
- task: e2e:test:r
e2e:test:python:
desc: "Comprehensive tests for Python package"
dir: test_apps/python
cmds:
- uv sync
- uv run pytest comprehensive_test.py -v
e2e:test:node:
desc: "Comprehensive tests for Node package"
dir: test_apps/node
cmds:
- pnpm install
- pnpm test:comprehensive
e2e:test:ruby:
desc: "Comprehensive tests for Ruby gem"
dir: test_apps/ruby
cmds:
- bundle install
- bundle exec rspec comprehensive_test.rb
e2e:test:php:
desc: "Comprehensive tests for PHP package"
dir: test_apps/php
cmds:
- composer install
- vendor/bin/phpunit comprehensive_test.php
e2e:test:go:
desc: "Comprehensive tests for Go package"
dir: test_apps/go
cmds:
- go mod download
- go test -v -run Comprehensive
e2e:test:java:
desc: "Comprehensive tests for Java package"
dir: test_apps/java
cmds:
- ./mvnw{{if eq .OS "windows"}}.cmd{{end}} test -Dtest=ComprehensiveTest
e2e:test:csharp:
desc: "Comprehensive tests for C# package"
dir: test_apps/csharp
cmds:
- dotnet test --filter FullyQualifiedName~ComprehensiveTest
e2e:test:elixir:
desc: "Comprehensive tests for Elixir package"
dir: test_apps/elixir
cmds:
- mix test test/comprehensive_test.exs
e2e:test:r:
desc: "Comprehensive tests for R package"
dir: packages/r
cmds:
- Rscript -e 'devtools::test()'
# Demo tasks
build:demo:
desc: "Build the GitHub Pages demo"
cmds:
- ./scripts/build-demo.sh
serve:demo:
desc: "Serve the GitHub Pages demo locally on port 8000"
dir: docs
cmds:
- python3 -m http.server 8000
# Documentation
docs:build:
desc: "Build documentation site with zensical"
cmds:
- task: python:install
- uv sync --group doc
- uv run zensical build --clean --strict
# Clean artifacts
clean:
desc: "Remove build artifacts across all languages"
cmds:
- task: rust:clean
- task: python:clean
- task: ruby:clean
- task: node:clean
- task: typescript:clean
- task: wasm:clean
- task: php:clean
- task: go:clean
- task: java:clean
- task: csharp:clean
- task: elixir:clean
- task: r:clean
# Default task: show available tasks
default:
desc: "List available tasks"
cmds:
- task --list