From d2c5799b13b8765eb856600ad459087245e559e2 Mon Sep 17 00:00:00 2001 From: Yigit Sever Date: Sat, 23 Apr 2022 22:57:03 +0300 Subject: Add clippy lint to ci workflow --- .github/workflows/rust.yml | 47 ++++++++++++++++++++++++++++++++-------------- 1 file changed, 33 insertions(+), 14 deletions(-) (limited to '.github/workflows/rust.yml') diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index f1cc36d..7629aca 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -1,5 +1,4 @@ -name: Check and Lint - +name: ci on: pull_request: push: @@ -11,11 +10,13 @@ env: jobs: check: - name: Check + name: check runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 + - name: Checkout repository + uses: actions/checkout@v2 + - name: Install Rust + uses: actions-rs/toolchain@v1 with: profile: minimal toolchain: stable @@ -24,17 +25,35 @@ jobs: with: command: check fmt: - name: Rustfmt + name: rustfmt runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: + - name: Checkout repository + uses: actions/checkout@v2 + - name: Install Rust + uses: actions-rs/toolchain@v1 + with: + toolchain: stable profile: minimal + override: true + components: rustfmt + - name: Check formatting + run: | + cargo fmt --all -- --check + clippy: + name: clippy + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v2 + - name: Install Rust + uses: actions-rs/toolchain@v1 + with: toolchain: stable + components: clippy override: true - - run: rustup component add rustfmt - - uses: actions-rs/cargo@v1 - with: - command: fmt - args: --all -- --check + - name: Lint \w Clippy + uses: actions-rs/clippy-check@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + -- cgit v1.2.3-70-g09d2