name: Cargo Check
on:
pull_request:
workflow_dispatch:
workflow_call:
push:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt, clippy
- name: Cache Packages
uses: Swatinem/rust-cache@v2
- name: Check formatting
run: cargo fmt --check
- name: Check build
run: cargo clippy
- name: Install cargo-hack
uses: taiki-e/install-action@cargo-hack
- name: Check all features
run: cargo hack check --feature-powerset --no-dev-deps