From e742075928c903a8423134823ba0554a3f24c1a3 Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Thu, 21 Mar 2024 09:45:28 +0100 Subject: [PATCH] Check formatting and clippy in CI --- .github/workflows/main.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4f2f1a6f..f2fa4305 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -70,3 +70,25 @@ jobs: - name: Mark the job as unsuccessful run: exit 1 if: ${{ !success() }} + + lint: + name: Lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Install stable toolchain + run: | + rustup set profile minimal + rustup override set stable + + - name: Install clippy + run: | + rustup component add clippy + rustup component add rustfmt + + - name: Format + run: cargo fmt --all -- --check + + - name: Run clippy + run: cargo clippy --all-features --all-targets -- -D warnings