From 4c9b3b76c68f8fd5102af8ef4a9dacd5a0fbf091 Mon Sep 17 00:00:00 2001 From: Pedro Mendes Date: Sat, 9 Sep 2023 14:10:22 -0300 Subject: [PATCH] fix: Run clippy workflow only in pull request --- .github/workflows/ci.yml | 7 +------ .github/workflows/clippy.yml | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/clippy.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 174d772..b600d3f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,7 +1,6 @@ name: CI -on: - [push, pull_request] +on: push env: CARGO_TERM_COLOR: always @@ -20,10 +19,6 @@ jobs: - uses: actions/checkout@v3 - run: rustup component add clippy - uses: Swatinem/rust-cache@v2 - - uses: actions-rs/clippy-check@v1 - with: - token: ${{ secrets.GITHUB_TOKEN }} - args: --all-features - name: Run cargo fmt run: cargo fmt --all -- --check - name: Run tests diff --git a/.github/workflows/clippy.yml b/.github/workflows/clippy.yml new file mode 100644 index 0000000..9b3a154 --- /dev/null +++ b/.github/workflows/clippy.yml @@ -0,0 +1,18 @@ +name: Clippy + +on: pull_request + +env: + CARGO_TERM_COLOR: always + +jobs: + clippy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - run: rustup component add clippy + - uses: Swatinem/rust-cache@v2 + - uses: actions-rs/clippy-check@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + args: --all-features \ No newline at end of file