Skip to content

Fix caching

Fix caching #152

Workflow file for this run

name: Linting
on: [push, pull_request]
jobs:
dependency-lint:
name: Dependency linting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-rustc-${{ matrix.rust }}-cargo-${{ hashFiles('**/Cargo.lock') }}-deplint
- run: rm rust-toolchain.toml
- uses: EmbarkStudios/cargo-deny-action@v1
with:
arguments: --all-features
command-arguments: --allow license-not-encountered
code-lint:
name: Code linting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-rustc-${{ matrix.rust }}-cargo-${{ hashFiles('**/Cargo.lock') }}-lint
- run: rm rust-toolchain.toml
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: nightly-2023-06-19
components: clippy, rust-src
- uses: KyleMayes/install-llvm-action@v1
with:
version: "15.0"
- run: cargo clippy --all-features -- --deny warnings
code-format:
name: Check formatting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-rustc-${{ matrix.rust }}-cargo-${{ hashFiles('**/Cargo.lock') }}-fmt
- run: rm rust-toolchain.toml
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: nightly-2023-06-19
components: rustfmt, rust-src
- run: cargo fmt -- --check