cargo-options 0.7.6

Reusable common Cargo command line options
Documentation
on:
  push:
    branches:
      - main
  pull_request:

name: CI

concurrency:
  group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.event.pull_request.number || github.sha }}
  cancel-in-progress: true

jobs:
  check:
    name: Check
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: cargo check --all

  test:
    name: Test Suite
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [ubuntu-latest, macos-latest, windows-latest]
        rust: [stable, '1.74.0']
    steps:
      - uses: actions/checkout@v4
      - run: rustup override set ${{ matrix.rust }}
      - name: Cache cargo build
        uses: Swatinem/rust-cache@v2
      - run: cargo test
        if: matrix.rust != '1.74.0'
      - run: cargo build
        if: matrix.rust == '1.74.0'

  fmt:
    name: Rustfmt
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: cargo fmt --all -- --check

  clippy_check:
    name: Clippy Check
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: cargo clippy --all-features

  spellcheck:
    name: spellcheck
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v4
      - uses: codespell-project/actions-codespell@master