Skip to content

ci: Split cargo jobs into files & target matrices #1

ci: Split cargo jobs into files & target matrices

ci: Split cargo jobs into files & target matrices #1

Workflow file for this run

name: Linter
on:
push:
paths:
- '**.rs'
- '.github/workflows/**.yml'
pull_request:
paths:
- '**.rs'
- '.github/workflows/**.yml'
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
jobs:
lint:
runs-on: ubuntu-latest
strategy:
matrix:
target:
- --lib
- --bins
- --examples
- --tests
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: target/
key: cargo-lint-${{ hashFiles('Cargo.lock') }}
restore-keys: |
cargo-lint-${{ hashFiles('Cargo.lock') }}
cargo-lint-
cargo-
- name: clippy
run: cargo clippy --no-deps ${{ matrix.target }} --verbose -- -Dwarnings
- name: fmt
run: cargo fmt --all --check --verbose