Skip to content

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

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

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

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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Install Rust toolchain
run: |
rustup toolchain install nightly --profile minimal --component clippy
rustup default nightly
- name: Rust cache
uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Install Rust toolchain
run: |
rustup toolchain install nightly --profile minimal --component rustfmt
rustup default nightly
- 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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
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 # v1.2.2
with:
jobs: ${{ toJSON(needs) }}