From 6f4f3f5b8173f76d9f3cd3359562177ad560819c Mon Sep 17 00:00:00 2001 From: Ratan Kaliani Date: Thu, 24 Oct 2024 15:24:58 -0700 Subject: [PATCH] feat: pr clippy workflow --- .github/workflows/pr.yml | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/pr.yml diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml new file mode 100644 index 0000000..195c0fc --- /dev/null +++ b/.github/workflows/pr.yml @@ -0,0 +1,40 @@ +name: PR + +on: + push: + branches: [main] + pull_request: + branches: + - "**" + merge_group: + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +jobs: + lint: + name: Formatting & Clippy + runs-on: [runs-on, runner=16cpu-linux-arm64 , "run-id=${{ github.run_id }}"] + env: + CARGO_NET_GIT_FETCH_WITH_CLI: "true" + steps: + - name: Checkout sources + uses: actions/checkout@v4 + + - name: Install Rust + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + components: rustfmt + + - name: Run rustfmt + run: cargo fmt --all -- --check + env: + CARGO_INCREMENTAL: 1 + + - name: Run cargo clippy + run: cargo clippy --all-features --all-targets -- -D warnings -A incomplete-features + env: + CARGO_INCREMENTAL: 1 \ No newline at end of file