fluent-typed 0.8.0

Type-safe access to Fluent localization messages
Documentation
name: CI

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

env:
  CARGO_TERM_COLOR: always

jobs:
  test:
    name: Test (stable)
    # Windows is in the matrix because the generated `include_bytes!` path and
    # the test-suite portability regress silently on a unix-only matrix
    # (issue #37).
    strategy:
      matrix:
        os: [ubuntu-latest, windows-latest]
    runs-on: ${{ matrix.os }}
    steps:
      - uses: actions/checkout@v7
      - uses: dtolnay/rust-toolchain@stable
      - uses: Swatinem/rust-cache@v2
      - name: Run tests
        run: cargo test --features build,langneg --verbose

  fmt:
    name: Rustfmt
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v7
      - uses: dtolnay/rust-toolchain@stable
        with:
          components: rustfmt
      - run: cargo fmt --all --check

  clippy:
    name: Clippy
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v7
      - uses: dtolnay/rust-toolchain@stable
        with:
          components: clippy
      - uses: Swatinem/rust-cache@v2
      - run: cargo clippy --all-targets --features build,langneg -- -D warnings

  docs:
    name: Docs
    runs-on: ubuntu-latest
    env:
      RUSTDOCFLAGS: "-D warnings"
    steps:
      - uses: actions/checkout@v7
      - uses: dtolnay/rust-toolchain@stable
      - uses: Swatinem/rust-cache@v2
      - run: cargo doc --no-deps --features build,langneg

  msrv:
    name: MSRV (1.88)
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v7
      # Install the MSRV toolchain via the `toolchain` input rather than the
      # `@1.88.0` git ref. dtolnay/rust-toolchain treats its tag as the Rust
      # version to install, so pinning `@1.88.0` made dependabot keep trying to
      # bump it to nonexistent Rust releases. Pinning `@stable` (a branch) and
      # passing the version as an input keeps dependabot out of it while still
      # verifying the `rust-version` declared in Cargo.toml.
      - uses: dtolnay/rust-toolchain@stable
        with:
          toolchain: "1.88"
      - uses: Swatinem/rust-cache@v2
      - run: cargo build --features build,langneg