add check for unused dependencies (#2461)

# Objective

- Unused dependencies are bad

## Solution

- Add check for unused dependencies with https://github.com/est31/cargo-udeps - #2455
This commit is contained in:
François 2021-07-16 01:38:41 +00:00
parent 927973ce6a
commit de0d459618
2 changed files with 20 additions and 0 deletions

1
.github/bors.toml vendored
View file

@ -11,6 +11,7 @@ status = [
"run-examples",
"check-doc",
"check-missing-examples-in-docs",
"check-unused-dependencies",
]
use_squash_merge = true

View file

@ -168,3 +168,22 @@ jobs:
file-types: '[".rs"]'
exclude-folders: '["./examples/ios"]'
exclude-files: '[]'
check-unused-dependencies:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
- name: Installs cargo-udeps
run: cargo install cargo-udeps
- name: Install alsa and udev
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev
- name: Run cargo udeps
run: cargo udeps