-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTaskfile.yml
115 lines (96 loc) · 2.17 KB
/
Taskfile.yml
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
version: "3"
vars:
CARGO_INCREMENTAL: 0
RUSTFLAGS: "-D warnings"
tasks:
default:
cmds:
- task --list-all
silent: true
build:
desc: Build the project
cmds:
- cargo build
sources:
- src/**/*.rs
- Cargo.toml
generates:
- target/debug/tbd-cfg
test:
desc: Run all tests
cmds:
- cargo test --all-features
integration-test:
desc: Run integration tests (requires ansible)
deps: [check-ansible]
cmds:
- cargo test --test '*' --features integration
check-ansible:
desc: Check if ansible is installed
cmds:
- ansible --version
silent: true
check:
desc: Run all checks (format, clippy, test)
cmds:
- task: fmt-check
- task: clippy
- task: test
clippy:
desc: Run clippy
cmds:
- cargo clippy --all-targets --all-features -- -D warnings
fmt:
desc: Format code
cmds:
- cargo fmt --all
fmt-check:
desc: Check code formatting
cmds:
- cargo fmt --all -- --check
clean:
desc: Clean build artifacts
cmds:
- cargo clean
install-tools:
desc: Install development tools
cmds:
- cargo install cargo-watch cargo-audit cargo-outdated
- rustup component add clippy rustfmt
audit:
desc: Run security audit
cmds:
- cargo audit
outdated:
desc: Check for outdated dependencies
cmds:
- cargo outdated
ci:
desc: Run CI pipeline locally
cmds:
- task: clean
- task: check
- task: build
- task: test
run:
desc: Run the CLI with arguments
cmds:
- cargo run -- {{.CLI_ARGS}}
dev:
desc: Start development environment with file watching
cmds:
- cargo watch -x 'run -- {{.CLI_ARGS}}'
# Example configuration tasks
example:
desc: Create example configuration
dir: target
cmds:
- mkdir -p examples/ansible
- cp ../examples/playbook.yml examples/ansible/
- cp ../examples/inventory.yml examples/ansible/
apply-example:
desc: Apply example configuration
deps: [example]
dir: target/examples
cmds:
- cargo run -- apply -c ansible/playbook.yml -i ansible/inventory.yml