File tree Expand file tree Collapse file tree 1 file changed +23
-1
lines changed Expand file tree Collapse file tree 1 file changed +23
-1
lines changed Original file line number Diff line number Diff line change 85
85
name : ruff
86
86
path : target/debug/ruff
87
87
88
-
89
88
cargo-test-wasm :
90
89
runs-on : ubuntu-latest
91
90
name : " cargo test (wasm)"
@@ -176,3 +175,26 @@ jobs:
176
175
with :
177
176
name : ecosystem-result
178
177
path : ecosystem-result
178
+
179
+ cargo-udeps :
180
+ name : " cargo udeps"
181
+ runs-on : ubuntu-latest
182
+ steps :
183
+ - uses : actions/checkout@v3
184
+ - name : " Install Rust toolchain"
185
+ run : rustup toolchain install nightly
186
+ - name : " Install cargo-udeps"
187
+ uses : taiki-e/install-action@cargo-udeps
188
+ - name : " Run cargo-udeps"
189
+ run : |
190
+ unused_dependencies=$(cargo +nightly udeps > unused.txt && cat unused.txt | cut -d $'\n' -f 2-)
191
+ if [ -z "$unused_dependencies" ]; then
192
+ echo "No unused dependencies found" > $GITHUB_STEP_SUMMARY
193
+ exit 0
194
+ else
195
+ echo "Unused dependencies found" > $GITHUB_STEP_SUMMARY
196
+ echo '```console' >> $GITHUB_STEP_SUMMARY
197
+ echo "$unused_dependencies" >> $GITHUB_STEP_SUMMARY
198
+ echo '```' >> $GITHUB_STEP_SUMMARY
199
+ exit 1
200
+ fi
You can’t perform that action at this time.
0 commit comments