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:
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

@ -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