rust-spec 0.3.0

Classification of types in accordance with the Rust specification
Documentation
name: CI

on:
  push:
    branches: [main]
  pull_request:
    branches: [main]

concurrency:
  group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
  cancel-in-progress: true

jobs:
  static-analysis:
    runs-on: ubuntu-latest
    timeout-minutes: 5

    steps:
    - uses: actions/checkout@v7
    - uses: Swatinem/rust-cache@v2
    - uses: dtolnay/rust-toolchain@stable
      with:
        components: rustfmt, clippy

    - name: Rust format
      run: cargo fmt --all --check

    - name: Link workspace
      run: cargo clippy --workspace --benches --tests --examples -- --deny warnings

    - name: Link workspace (no default features)
      run: cargo clippy --workspace --benches --tests --examples --no-default-features -- --deny warnings

    - name: Link workspace (alloc only)
      run: cargo clippy --workspace --benches --tests --examples --no-default-features --features alloc -- --deny warnings

    - name: Link workspace (derive only)
      run: cargo clippy --workspace --benches --tests --examples --no-default-features --features derive -- --deny warnings

  tests:
    runs-on: ubuntu-latest
    timeout-minutes: 5

    steps:
    - uses: actions/checkout@v7
    - uses: Swatinem/rust-cache@v2
    - uses: dtolnay/rust-toolchain@stable

    - name: Run tests
      run: cargo test --workspace