From 2cc899338a5fd8a0b47a570bbc891047487ca8fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damir=20Jeli=C4=87?= Date: Tue, 8 Dec 2020 11:21:09 +0100 Subject: [PATCH] CI: Split out the fmt and clippy runs into two jobs. --- .github/workflows/lint.yml | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index ad5c1e91..ffb02400 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,4 +1,4 @@ -name: Lint +name: CI on: push: @@ -9,16 +9,21 @@ env: CARGO_TERM_COLOR: always jobs: - lint: + style: + name: Check style runs-on: ubuntu-latest steps: - name: Checkout the repo uses: actions/checkout@v2 + - name: Install rust uses: actions-rs/toolchain@v1 with: toolchain: stable + components: rustfmt + profile: minimal + override: true - name: Cargo fmt uses: actions-rs/cargo@v1 @@ -26,6 +31,23 @@ jobs: command: fmt args: --all -- --check + clippy: + name: Run clippy + needs: [style] + runs-on: ubuntu-latest + + steps: + - name: Checkout the repo + uses: actions/checkout@v2 + + - name: Install rust + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + components: clippy + profile: minimal + override: true + - name: Clippy uses: actions-rs/cargo@v1 with: