From 0d8311f8a4b7ac8e9ce77c50fc9461b20ff573f5 Mon Sep 17 00:00:00 2001 From: smolck <46855713+smolck@users.noreply.github.com> Date: Sat, 3 Jul 2021 14:00:35 -0500 Subject: [PATCH] ci(): clippy & cargo fmt check separate from build (#781) --- .github/workflows/build.yml | 24 ++++-------------------- .github/workflows/clippy.yml | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 20 deletions(-) create mode 100644 .github/workflows/clippy.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5daf9a5..eb04c94 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,7 +15,7 @@ jobs: with: profile: minimal toolchain: nightly - components: rustfmt, clippy + components: rustfmt override: true - name: Install Utilities @@ -28,10 +28,6 @@ jobs: run: | cargo fmt --all -- --check - - name: Lint with Clippy - run: | - cargo clippy --all -- -D warnings - - name: Install Neovim run: | choco install -y neovim @@ -70,7 +66,7 @@ jobs: with: profile: minimal toolchain: nightly - components: rustfmt, clippy + components: rustfmt override: true - name: Install Utilities @@ -83,10 +79,6 @@ jobs: run: | cargo fmt --all -- --check - - name: Lint with Clippy - run: | - cargo clippy --all -- -D warnings - - name: Uninstall Conflicting LLVM run: | brew uninstall llvm @@ -135,7 +127,7 @@ jobs: with: profile: minimal toolchain: nightly - components: rustfmt, clippy + components: rustfmt override: true - name: Install Utilities @@ -152,10 +144,6 @@ jobs: run: | cargo fmt --all -- --check - - name: Lint with Clippy - run: | - cargo clippy --all -- -D warnings - - name: Install Neovim run: | sudo apt-get install -y neovim @@ -193,7 +181,7 @@ jobs: with: profile: minimal toolchain: nightly - components: rustfmt, clippy + components: rustfmt override: true - name: Install Utilities @@ -204,10 +192,6 @@ jobs: run: | cargo fmt --all -- --check - - name: Lint with Clippy - run: | - cargo clippy --all -- -D warnings - - name: Install Neovim run: | brew install neovim diff --git a/.github/workflows/clippy.yml b/.github/workflows/clippy.yml new file mode 100644 index 0000000..2512041 --- /dev/null +++ b/.github/workflows/clippy.yml @@ -0,0 +1,35 @@ +name: Clippy + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +env: + CARGO_TERM_COLOR: always + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Install Nightly Toolchain + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: nightly + components: rustfmt + override: true + + - name: Check formatting + run: | + cargo fmt --all -- --check + + - name: Lint with Clippy + uses: actions-rs/clippy-check@v1.0.7 + with: + token: ${{ secrets.GITHUB_TOKEN }}