flexpect 0.0.2

Attribute macro that falls back to #[allow] if #[expect] is not supported
Documentation
name: CI

on:
  push:
    branches: [main]
  pull_request:
    branches: [main]
  schedule:
    - cron: "17 3 * * *"

jobs:
  expect:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        toolchain: ["1.81.0", "stable", "beta", "nightly"]
    env:
      CARGO_NET_GIT_FETCH_WITH_CLI: "true"
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@master
        with:
          toolchain: ${{ matrix.toolchain }}
          components: clippy
      # Run two tests to ensure that the output is consistent
      - name: Run cargo check simple comparison
        run: ./tests/compare-output.sh "check --all-features --test simple" "tests/check-expect-supported-simple.out"
      - name: Run cargo check submod comparison
        run: ./tests/compare-output.sh "check --all-features --test submod" "tests/check-expect-supported-submod.out"
      - name: cargo clean
        run: cargo clean
      - name: Run cargo clippy simple comparison
        run: ./tests/compare-output.sh "clippy --all-features --test simple" "tests/clippy-expect-supported-simple.out"
      - name: Run cargo clippy submod comparison
        run: ./tests/compare-output.sh "clippy --all-features --test submod" "tests/clippy-expect-supported-submod.out"
      - name: cargo clean
        run: cargo clean
      - name: cargo test
        run: cargo test --all-targets

  allow-check:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        toolchain: ["1.43.0", "1.80.0"]
    env:
      RUSTFLAGS: "-D warnings"
      CARGO_NET_GIT_FETCH_WITH_CLI: "true"
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@master
        with:
          toolchain: ${{ matrix.toolchain }}
      - name: cargo check
        run: cargo check --all-targets --all-features
      - name: cargo clean
        run: cargo clean
      - name: cargo test
        run: cargo test --all-targets --all-features

  allow-clippy:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        toolchain: ["1.64.0", "1.80.0"] # clippy+rustversion only works with clippy >= 1.64.0
    env:
      RUSTFLAGS: "-D warnings"
      CARGO_NET_GIT_FETCH_WITH_CLI: "true"
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@master
        with:
          toolchain: ${{ matrix.toolchain }}
          components: clippy
      - name: cargo check
        run: cargo check --all-targets --all-features
      - name: cargo clean
        run: cargo clean
      - name: cargo clippy
        run: cargo clippy --all-targets --all-features
      - name: cargo clean
        run: cargo clean
      - name: cargo test
        run: cargo test --all-targets --all-features

  ignore-check:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        toolchain: ["1.38.0", "1.42.0"]
    env:
      CARGO_NET_GIT_FETCH_WITH_CLI: "true"
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@master
        with:
          toolchain: ${{ matrix.toolchain }}
      - name: Run cargo check simple comparison
        run: ./tests/compare-output.sh "check --all-features --test simple" "tests/check-expect-ignored-simple.out"
      - name: cargo clean
        run: cargo clean
      - name: cargo test -- simple
        run: cargo test -- simple