ci(): clippy & cargo fmt check separate from build (#781)

macos-click-through
smolck 3 years ago committed by GitHub
parent ee85e037ec
commit 0d8311f8a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -15,7 +15,7 @@ jobs:
with: with:
profile: minimal profile: minimal
toolchain: nightly toolchain: nightly
components: rustfmt, clippy components: rustfmt
override: true override: true
- name: Install Utilities - name: Install Utilities
@ -28,10 +28,6 @@ jobs:
run: | run: |
cargo fmt --all -- --check cargo fmt --all -- --check
- name: Lint with Clippy
run: |
cargo clippy --all -- -D warnings
- name: Install Neovim - name: Install Neovim
run: | run: |
choco install -y neovim choco install -y neovim
@ -70,7 +66,7 @@ jobs:
with: with:
profile: minimal profile: minimal
toolchain: nightly toolchain: nightly
components: rustfmt, clippy components: rustfmt
override: true override: true
- name: Install Utilities - name: Install Utilities
@ -83,10 +79,6 @@ jobs:
run: | run: |
cargo fmt --all -- --check cargo fmt --all -- --check
- name: Lint with Clippy
run: |
cargo clippy --all -- -D warnings
- name: Uninstall Conflicting LLVM - name: Uninstall Conflicting LLVM
run: | run: |
brew uninstall llvm brew uninstall llvm
@ -135,7 +127,7 @@ jobs:
with: with:
profile: minimal profile: minimal
toolchain: nightly toolchain: nightly
components: rustfmt, clippy components: rustfmt
override: true override: true
- name: Install Utilities - name: Install Utilities
@ -152,10 +144,6 @@ jobs:
run: | run: |
cargo fmt --all -- --check cargo fmt --all -- --check
- name: Lint with Clippy
run: |
cargo clippy --all -- -D warnings
- name: Install Neovim - name: Install Neovim
run: | run: |
sudo apt-get install -y neovim sudo apt-get install -y neovim
@ -193,7 +181,7 @@ jobs:
with: with:
profile: minimal profile: minimal
toolchain: nightly toolchain: nightly
components: rustfmt, clippy components: rustfmt
override: true override: true
- name: Install Utilities - name: Install Utilities
@ -204,10 +192,6 @@ jobs:
run: | run: |
cargo fmt --all -- --check cargo fmt --all -- --check
- name: Lint with Clippy
run: |
cargo clippy --all -- -D warnings
- name: Install Neovim - name: Install Neovim
run: | run: |
brew install neovim brew install neovim

@ -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 }}
Loading…
Cancel
Save