From 6a50f27991fe9e8cf4e614a85d839c4276610f80 Mon Sep 17 00:00:00 2001 From: Guillaume Bogard Date: Fri, 9 Feb 2024 15:47:59 +0100 Subject: [PATCH] CI: added a clippy job --- .github/workflows/ci.yml | 43 ++++++++++++++++++++++++++-------------- 1 file changed, 28 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 75f31c5..552422d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,7 +4,7 @@ on: push: pull_request: -env: +env: CARGO_TERM_COLOR: always jobs: @@ -25,17 +25,30 @@ jobs: name: rustfmt runs-on: ubuntu-latest steps: - - name: Checkout repository - uses: actions/checkout@v1 - with: - fetch-depth: 1 - - name: Install Rust - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - override: true - profile: minimal - components: rustfmt - - name: Check formatting - run: | - cargo fmt -- --check + - name: Checkout repository + uses: actions/checkout@v1 + with: + fetch-depth: 1 + - name: Install Rust + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + override: true + profile: minimal + components: rustfmt + - name: Check formatting + run: | + cargo fmt -- --check + + clippy: + name: Clippy + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + override: true + profile: minimal + components: clippy + - run: cargo clippy --tests -- -D warnings