-
Notifications
You must be signed in to change notification settings - Fork 107
Expand file tree
/
Copy pathTaskfile.yml
More file actions
129 lines (110 loc) · 3.04 KB
/
Taskfile.yml
File metadata and controls
129 lines (110 loc) · 3.04 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
version: "3"
tasks:
# CLI
build:
desc: Build the project in release mode (native Apple Silicon)
cmds:
- cargo build --release
sources:
- src/**/*.rs
- Cargo.toml
generates:
- target/release/git-ai-cli
build-debug:
desc: Build the project in debug mode (native Apple Silicon)
cmds:
- cargo build
sources:
- src/**/*.rs
- Cargo.toml
generates:
- target/debug/git-ai-cli
clean:
desc: Clean build artifacts
cmds:
- cargo clean
release:local:
desc: Build release and install to user bin directory
deps: [build]
cmds:
- cp target/release/git-ai ~/.local/bin/git-ai
- chmod +x ~/.local/bin/git-ai
debug:local:
desc: Build release and install to user bin directory
deps: [build-debug]
cmds:
- cp target/debug/git-ai ~/.local/bin/git-ai
- chmod +x ~/.local/bin/git-ai
test:e2e:
desc: Run the end-to-end tests with debug build
deps: [build-debug]
cmds:
- bats tests/e2e/user-scenarios.bats
test:e2e:release:
desc: Run the end-to-end tests with release build
deps: [build]
cmds:
- bats tests/e2e/user-scenarios.bats
test:
desc: Run unit tests
cmds:
- cargo test
lint:
desc: Run cargo check and clippy with warnings as errors
cmds:
- cargo clippy --all-targets -- -D warnings
bench:
desc: Run benchmarks
cmds:
- cargo bench
doc:
desc: Build documentation with warnings as errors
cmds:
- cargo doc --no-deps
env:
RUSTDOCFLAGS: "-D warnings"
format:
desc: Format code with rustfmt
cmds:
- cargo fmt
format:check:
desc: Check code formatting (CI)
cmds:
- cargo fmt -- --check
coverage:
desc: Run tests with coverage and show summary
cmds:
- cargo llvm-cov test --ignore-filename-regex='tests/.*|benches/.*|examples/.*'
coverage:html:
desc: Generate HTML coverage report and open in browser
cmds:
- cargo llvm-cov test --ignore-filename-regex='tests/.*|benches/.*|examples/.*' --html --open
coverage:lcov:
desc: Generate LCOV coverage report
cmds:
- cargo llvm-cov test --ignore-filename-regex='tests/.*|benches/.*|examples/.*' --lcov --output-path lcov.info
coverage:check:
desc: Run coverage and fail if below threshold
cmds:
- cargo llvm-cov test --ignore-filename-regex='tests/.*|benches/.*|examples/.*' --fail-under-lines {{.COVERAGE_THRESHOLD}}
vars:
COVERAGE_THRESHOLD: '{{.COVERAGE_THRESHOLD | default "50"}}'
update:
desc: Update dependencies
cmds:
- cargo update
all:
desc: Build, test, lint, and generate docs
deps: [build, test, lint, doc]
install:
desc: Install dependencies using Cargo
cmds:
- cargo install --path .
fuzz:
desc: Run fuzz testing (requires nightly)
cmds:
- cargo +nightly fuzz run fuzz_checkpoint -- -max_total_time=60
miri:
desc: Run miri for undefined behavior detection (requires nightly)
cmds:
- cargo +nightly miri test --lib