ordinal 0.4.0

Format numbers as ordinals efficiently.
Documentation
name: ci

on:
  pull_request:
  push:
    branches:
    - main
  workflow_call:

defaults:
  run:
    shell: bash

env:
  CARGO_INCREMENTAL: 0
  RUSTFLAGS: -Dwarnings

jobs:
  test:
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os:
        - macos-latest
        - ubuntu-latest
        - windows-latest
    steps:
    - name: Checkout
      uses: actions/checkout@v4
    - name: Cache
      uses: actions/cache@v4
      with:
        path: |
          ~/.cargo/bin/
          ~/.cargo/registry/index/
          ~/.cargo/registry/cache/
          ~/.cargo/git/db/
          target/
        key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
    - name: Set up toolchain
      run: rustup show
    - name: Test all features
      run: |
        cargo test --all-features --all-targets --workspace
        cargo test --all-features --doc --workspace
    - name: Test non-default features
      run: |
        cargo test --no-default-features --all-targets --workspace
        cargo test --no-default-features --features alloc --all-targets --workspace
        cargo test --no-default-features --doc --workspace
  analyze:
    runs-on: ubuntu-latest
    steps:
    - name: Checkout
      uses: actions/checkout@v4
    - name: Cache
      uses: actions/cache@v4
      with:
        path: |
          ~/.cargo/bin/
          ~/.cargo/registry/index/
          ~/.cargo/registry/cache/
          ~/.cargo/git/db/
          target/
        key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
    - name: Set up toolchain
      run: rustup show
    - name: Check formatting
      run: cargo fmt --all -- --check
    - name: Lint
      run: |
        cargo clippy --all-features --all-targets --no-deps --workspace
        cargo clippy --no-default-features --all-targets --no-deps --workspace
    - name: Check spelling
      uses: streetsidesoftware/cspell-action@v6
      with:
        config: .cspell.json
    - name: Build documentation
      run: cargo doc --all-features --no-deps --workspace