-
-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathTaskfile.yml
More file actions
141 lines (119 loc) · 4.25 KB
/
Copy pathTaskfile.yml
File metadata and controls
141 lines (119 loc) · 4.25 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
version: "3"
tasks:
lint:
desc: Run linter
cmds:
- cargo clippy --workspace --all-targets --all-features -- -D warnings
format:
desc: Check code formatting
cmds:
- cargo fmt --
build-release:
desc: Build release version
cmds:
- cargo build --release
test:
desc: Run tests
cmds:
- cargo test --workspace
test-debug:
desc: Run tests with debug logging
cmds:
- RUST_LOG=debug cargo test
test-trace:
desc: Run tests with trace logging for parser
cmds:
- RUST_LOG=panache::parser=trace cargo test
test-quiet:
desc: Run tests quietly (no debug output)
cmds:
- RUST_LOG=off cargo test
dev:
desc: Development workflow - check, test, lint
cmds:
- cargo check
- cargo test
- cargo clippy --all-targets --all-features -- -D warnings
docs-preview:
desc: Preview documentation site locally
cmds:
- cd docs && quarto preview --no-browser
lighthouse:
desc: Render docs and run a Lighthouse audit against the local site
vars:
PORT: '{{.PORT | default "4210"}}'
cmds:
- quarto render docs
- |
set -e
export CHROME_PATH="${CHROME_PATH:-$(command -v chromium || command -v chromium-browser || command -v google-chrome || command -v google-chrome-stable)}"
python3 -m http.server {{.PORT}} --directory docs/_site --bind 127.0.0.1 >/dev/null 2>&1 &
SRV=$!
trap 'kill $SRV 2>/dev/null' EXIT
for i in $(seq 1 20); do curl -sf "http://127.0.0.1:{{.PORT}}/" >/dev/null && break; sleep 0.3; done
mkdir -p docs/lighthouse
lighthouse "http://127.0.0.1:{{.PORT}}/" \
--quiet \
--chrome-flags="--headless=new --no-sandbox --disable-gpu" \
--output=html --output=json \
--output-path=docs/lighthouse/report \
--only-categories=performance,accessibility,best-practices,seo
echo "Report: docs/lighthouse/report.report.html"
benchmarks:
desc: Run multi-formatter benchmark and write JSON consumed by docs/guide/performance.qmd
cmds:
- bash benches/compare_all.sh --json --out docs/guide/performance_data.json
refresh-benchmarks:
desc: Re-run benchmarks and rebuild the performance page (invalidates freeze cache)
cmds:
- bash benches/compare_all.sh --json --out docs/guide/performance_data.json
- rm -rf docs/_freeze/guide/performance
- cd docs && quarto render guide/performance.qmd
wasm-build:
desc: Build and sync panache-wasm for playground
cmds:
- wasm-pack build crates/panache-wasm --target web
- rm -rf docs/playground/pkg
- cp -r crates/panache-wasm/pkg docs/playground/
- rm -f docs/playground/pkg/.gitignore
playground-serve:
desc: Serve playground locally
cmds:
- cd docs/playground && python3 -m http.server
update-golden-expected:
desc: Update expected golden test outputs
cmds:
- UPDATE_EXPECTED=1 cargo test --test golden_cases
update-yaml-fixtures:
desc: Download and refresh panache-parser yaml-test-suite fixtures (default data-2022-01-17)
cmds:
- ./crates/panache-parser/scripts/update-yaml-test-suite-fixtures.sh data-2022-01-17
update-commonmark-fixtures:
desc: Download and refresh CommonMark spec.txt fixture (default 0.31.2)
cmds:
- ./crates/panache-parser/scripts/update-commonmark-spec-fixtures.sh 0.31.2
update-myst-fixtures:
desc: Download and refresh MyST smoke corpus fixtures (default v0.0.5)
cmds:
- ./crates/panache-parser/scripts/update-myst-spec-fixtures.sh v0.0.5
coverage:
desc: Generate code coverage report
cmds:
- cargo llvm-cov --all-features --workspace --html
- echo "Coverage report generated at target/llvm-cov/html/index.html"
coverage-open:
desc: Generate and open coverage report in browser
cmds:
- cargo llvm-cov --all-features --workspace --open
aur:push:
desc: "Manually publish panache-bin to the AUR (CI fallback; args: [version] [pkgrel])"
cmds:
- ./scripts/aur_push.sh {{.CLI_ARGS}}
vsix:
desc: Build VS Code extension package
dir: editors/code
cmds:
- npm install
- npm run compile
- npx @vscode/vsce package
- code --install-extension *.vsix --force