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