From 03cca7639a24a1246770b6ccf4a246a30f319916 Mon Sep 17 00:00:00 2001 From: Jonathan Woollett-Light Date: Wed, 20 Sep 2023 15:32:07 +0100 Subject: [PATCH] ci: Test for unused dependencies Adds a test for unused cargo dependencies. Signed-off-by: Jonathan Woollett-Light --- tests/integration_tests/build/test_dependencies.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/integration_tests/build/test_dependencies.py b/tests/integration_tests/build/test_dependencies.py index 778f5facc228..781b7f492d7d 100644 --- a/tests/integration_tests/build/test_dependencies.py +++ b/tests/integration_tests/build/test_dependencies.py @@ -6,6 +6,7 @@ import pytest +from framework import utils from host_tools import proc from host_tools.cargo_build import cargo @@ -25,3 +26,13 @@ def test_licenses(): ) cargo("deny", f"--manifest-path {toml_file} check licenses bans") + + +@pytest.mark.timeout(600) +def test_unused_dependencies(): + """ + Test that there are no unused dependencies. + """ + utils.run_cmd("cargo install cargo-udeps") + + utils.run_cmd("cargo +nightly udeps")