Skip to content

feat(coprocessor): import zama-ai/listener #1

feat(coprocessor): import zama-ai/listener

feat(coprocessor): import zama-ai/listener #1

name: cargo-clippy
on:
push:
branches: [main]
pull_request:
permissions: {}
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
check-changes:
name: cargo-clippy/check-changes
permissions:
actions: 'read'
contents: 'read'
pull-requests: 'read'
runs-on: ubuntu-latest
outputs:
rust-changed: ${{ github.event_name == 'push' || steps.filter.outputs.rust }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
if: github.event_name != 'push'
with:
persist-credentials: 'false'
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
if: github.event_name != 'push'
id: filter
with:
filters: |
rust:
- .github/workflows/listener-clippy.yml
- Cargo.toml
- Cargo.lock
- listener/crates/**
clippy:
name: cargo-clippy/run
needs: check-changes
if: ${{ needs.check-changes.outputs.rust-changed == 'true' }}
permissions:
contents: 'read'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: 'false'
- uses: dtolnay/rust-toolchain@a54c7afa936fefeb4456b2dd8068152669aa8203
with:
toolchain: 1.91.1
components: clippy
- uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
with:
path: |
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-cargo-clippy-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-clippy-
- run: >
cargo clippy --workspace --all-targets
-- -W clippy::perf -W clippy::suspicious -W clippy::style -D warnings