From a1822a4aafc07408d58f05a144c2ed7c87450696 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Linus=20F=C3=A4rnstrand?= Date: Wed, 29 May 2024 13:49:05 +0200 Subject: [PATCH] Add cargo clippy check to CI --- .github/workflows/linting.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/linting.yml diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml new file mode 100644 index 0000000..e989d30 --- /dev/null +++ b/.github/workflows/linting.yml @@ -0,0 +1,25 @@ +--- +name: Rust linting +on: + pull_request: + paths: + - .github/workflows/linting.yml + - '**/*.rs' + workflow_dispatch: +jobs: + clippy-linting: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions-rs/toolchain@v1.0.6 + with: + toolchain: stable + profile: minimal + components: clippy + default: true + + - name: Clippy check + env: + RUSTFLAGS: --deny warnings + run: cargo clippy --locked --all-targets