Repository navigation
Expand file tree
/
Copy pathTaskfile.yml
More file actions
169 lines (167 loc) · 4.39 KB
/
Copy pathTaskfile.yml
File metadata and controls
169 lines (167 loc) · 4.39 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
version: '3'
includes:
platform-test-windows:
taskfile: ./scripts/tasks/platform-test-windows.yml
flatten: true
platform-test-linux:
taskfile: ./scripts/tasks/platform-test-linux.yml
flatten: true
tasks:
default:
desc: Show all tasks
cmds:
- task --list
silent: true
ops:
desc: Run all ops tasks
ignore_error: true
cmds:
- task lint
- task format
- task secrets
- task scan
- task checks
lint:
desc: Run linters
cmds:
- cmd: cargo clippy --all-targets --all-features
- cmd: cargo check --all-targets --all-features
- cmd: cargo deny check
- cmd: cargo audit
- cmd: cargo machete
format:
desc: Run formatters
cmds:
- cmd: cargo fmt --all
test:
desc: Run tests using cargo nextest
cmds:
- cmd: cargo nextest run --all-targets --all-features
test-advanced:
desc: Run tests using cargo test
cmds:
- task: test
- cmd: cargo test --doc --all-features
- cmd: cargo mutants --output logs
build:
desc: Build targets
cmds:
- cmd: cargo build
build-strict:
desc: Build all targets and features
cmds:
- cmd: cargo build --all-targets --all-features
build-release:
desc: Build in release mode
cmds:
- cmd: cargo build --release
build-docs:
desc: Build rust docs
cmds:
- cmd: cargo doc --all-features
coverage:
desc: Run coverage tools
cmds:
- cmd: cargo llvm-cov --all-targets --all-features
coverage-report:
env:
targetdir: target
artifactsdir: artifacts
inputdir: target/llvm-cov-target
outputdir: covreport
desc: Generate coverage report
cmds:
- task: clean
- cmd: cargo llvm-cov --all-targets --all-features --no-report
- cmd: rm -rf $outputdir
- cmd: grcov $inputdir -s . -b $inputdir/debug -t html -o $outputdir
- cmd: mv $targetdir $outputdir/$artifactsdir
- cmd: echo /$artifactsdir/ > $outputdir/.gitignore
- task: clean
coveralls:
env:
outputdir: covreport
desc: Test the coveralls coverage report
cmds:
- task: clean
- cmd: mkdir -p $outputdir
- cmd: cargo llvm-cov --all-targets --all-features --lcov --output-path $outputdir/lcov.info
- cmd: coveralls report $outputdir/lcov.info --dry-run --debug
- cmd: rm -rf $outputdir
- task: clean
clean:
desc: Clean up the working directory
cmds:
- cmd: cargo clean
- cmd: rm -rf logs
- cmd: uvx ruff clean
cliff:
desc: Run git cliff
silent: true
env:
RUST_LOG: off
cmds:
- git-cliff --unreleased --strip all
check-cargo:
desc: Verify cargo configuration
ignore_error: true
cmds:
- cmd: cargo msrv verify --all-features
- cmd: cargo semver-checks --all-features
- cmd: cargo metadata --no-deps --quiet
- cmd: cargo tree --edges features
- cmd: cargo tree -d
check-links:
desc: Lint links
cmds:
- cmd: lychee --config .github/lychee.toml .
check-scripts:
desc: Lint scripts
ignore_error: true
cmds:
- cmd: fd -e sh . scripts -x shellcheck
- cmd: uvx ruff check . --no-cache
- cmd: uvx ruff format . --check --no-cache
check-configs:
desc: Lint configs
ignore_error: true
cmds:
- cmd: taplo lint
- cmd: taplo fmt
check-actions:
desc: Lint actions
cmds:
- cmd: pinact run
- cmd: pinact run --update --check
- cmd: actionlint
- cmd: zizmor . --quiet
checks:
desc: Run all checks
ignore_error: true
cmds:
- task: check-cargo
- task: check-links
- task: check-scripts
- task: check-configs
- task: check-actions
docs:
desc: Build the documentation site
cmds:
- cmd: mkdocs build --clean --strict
secrets:
desc: Run secret scans
ignore_error: true
cmds:
- cmd: trufflehog git file://. --results=verified,unknown --fail
- cmd: gitleaks git . --no-banner --verbose
- cmd: betterleaks git . --no-banner --verbose
scan:
desc: Run other ops tools on the repo
ignore_error: true
cmds:
- cmd: opengrep scan
- cmd: osv-scanner scan source --recursive .
- cmd: gitleaks git . --no-banner --verbose
- cmd: actionlint --verbose
- cmd: fd -e sh . scripts -x shellcheck
- cmd: scorecard --local . --format json | gron