noprop 0.2.1

Property-based testing with plain functions, ordinary control flow, and no dependencies
Documentation
name: CI

on: [push]

jobs:
  check:
    name: Check
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
      - run: rustup update stable
      - run: rustup default stable
      - run: cargo check --all --all-targets

  test:
    name: Test Suite
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
      - run: rustup update stable
      - run: rustup default stable
      # `--examples` replaces the default target set, so the full
      # suite must be selected explicitly; `--doc` cannot be combined
      # with other target selectors.
      - run: cargo test --all --lib --bins --tests --examples
      - run: cargo test --doc
      # `cargo test --examples` builds each example's binary but does
      # not execute its `main()` (no example carries `#[test]`), so the
      # run-time asserts inside each example never run under
      # `cargo test`. Invoke each explicitly so a broken assertion (or
      # a broken invariant an example demonstrates) fails CI.
      - name: Passing examples must exit 0
        run: |
          cargo run --example basics
          cargo run --example search_space
          cargo run --example stateful
      # The reproduce example demonstrates a failure and exits
      # non-zero by design; verify that expectation.
      - name: Reproduce example must fail
        run: |
          set +e
          cargo run --example reproduce > /dev/null 2>&1
          status=$?
          set -e
          test "$status" -eq 1

  msrv:
    name: MSRV
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
      # Verify the `rust-version` declared in the published crate's
      # Cargo.toml still builds. Scope the build to the noprop package
      # only (no `--all`): benchmark is `publish = false` and its
      # transitive dependencies' MSRV is not part of this crate's
      # contract, so failing on them would be noise.
      - run: rustup toolchain install 1.88 --profile minimal
      - run: rustup default 1.88
      - run: cargo build --all-targets

  lints:
    name: Lints
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
      - run: rustup update stable
      - run: rustup default stable
      - run: rustup component add rustfmt clippy
      - run: cargo fmt --all -- --check
      - run: cargo clippy --all --all-targets -- -D warnings

  docs:
    name: Docs
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
      - run: rustup update stable
      - run: rustup default stable
      - env:
          RUSTDOCFLAGS: -D warnings
        run: cargo doc --no-deps