Skip to content

chore(deps)(deps): bump Swatinem/rust-cache (#8) #22

chore(deps)(deps): bump Swatinem/rust-cache (#8)

chore(deps)(deps): bump Swatinem/rust-cache (#8) #22

Workflow file for this run

name: Lint
on:
pull_request:
merge_group:
push:
branches: [main]
env:
CARGO_TERM_COLOR: always
permissions: {}
jobs:
clippy:
name: Run clippy on crates
runs-on: ubuntu-latest
timeout-minutes: 60
permissions:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
persist-credentials: false
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@22a6a5b0f9f487c5f5587025ae9d4a1caf2a8a78 # clippy
- name: Rust cache
uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2
with:
cache-on-failure: true
- name: Run clippy
run: cargo clippy --workspace --examples --tests --benches --all-features --all-targets --locked
env:
RUSTFLAGS: -D warnings
fmt:
name: Check code formatting
runs-on: ubuntu-latest
timeout-minutes: 30
permissions:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
persist-credentials: false
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@fcf085fcb4b4b8f63f96906cd713eb52181b5ea4 # stable
with:
components: rustfmt
- name: Check Rust formatting
run: cargo fmt --all --check
taplo:
name: Lint and check formatting of TOML files
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
persist-credentials: false
- name: Install latest taplo
run: |
curl -fsSL https://github.com/tamasfe/taplo/releases/latest/download/taplo-full-linux-x86_64.gz \
| gzip -d - | install -m 755 /dev/stdin /usr/local/bin/taplo
- name: Run taplo lint
run: |
taplo lint
- name: Run taplo format check
run: |
taplo fmt --check
lint-success:
name: Check that lints passed
runs-on: ubuntu-latest
if: always()
needs:
- clippy
- fmt
- taplo
timeout-minutes: 30
steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe # release/v1
with:
jobs: ${{ toJSON(needs) }}