From 9720ff78b262a531b0895e76511ef49998e458aa Mon Sep 17 00:00:00 2001 From: Markus Pettersson Date: Fri, 8 Dec 2023 13:55:38 +0100 Subject: [PATCH] Add `clippy-test.yml` --- .github/workflows/clippy-test.yml | 43 +++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/clippy-test.yml diff --git a/.github/workflows/clippy-test.yml b/.github/workflows/clippy-test.yml new file mode 100644 index 000000000000..37a49f854196 --- /dev/null +++ b/.github/workflows/clippy-test.yml @@ -0,0 +1,43 @@ +# Run `clippy` on the `test` workspace +--- +name: Rust - Run Clippy to check lints (test workspace) +on: + pull_request: + paths: + - 'test/**/*.rs' + workflow_dispatch: +jobs: + clippy-check: + name: Clippy linting + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + runs-on: ${{ matrix.os }} + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Install Protoc + uses: arduino/setup-protoc@v1 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + + - uses: actions-rs/toolchain@v1.0.6 + with: + toolchain: stable + components: clippy + override: true + + - name: Install build dependencies + if: matrix.os == 'ubuntu-latest' + run: | + sudo apt-get update + sudo apt-get install libdbus-1-dev + + - name: Clippy check + working-directory: test + shell: bash + env: + RUSTFLAGS: --deny warnings + run: | + time cargo clippy --locked -- -W clippy::unused_async