fallback-if 1.0.1

Fall back to an alternative given some predicate
Documentation
name: "ci-test"
on:
  pull_request:
  push:
    branches:
      - master
      - main
  schedule:
    - cron: '00 05 * * 1'
jobs:
  test:
    name: test
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        build: [ ubuntu-stable, macos-stable, win-gnu-stable, win-msvc-stable ]
        include:
          - build: ubuntu-stable
            os: ubuntu-latest
            rust: stable

          - build: macos-stable
            os: macOS-latest
            rust: stable

          - build: win-gnu-stable
            os: windows-latest
            rust: stable-x86_64-gnu

          - build: win-msvc-stable
            os: windows-latest
            rust: stable

    steps:
      - name: checkout_repository
        uses: actions/checkout@v4

      # We would prefer to use `dtolnay/rust-toolchain@master with toolchain=${{ matrix.rust }}` or `rustup update ${{ matrix.rust }}`.
      # However, when using either we run into a linking issue:
      # `error: could not create link from 'C:\\Users\\runneradmin\\.cargo\\bin\\rustup.exe' to 'C:\\Users\\runneradmin\\.cargo\\bin\\cargo.exe'\n" })', tests\find_msrv.rs:156:39`
      # I find the message odd, because we only need to install the toolchain, not set it as the default, and replace the
      # binary; so what is meant by "link" in the above error?
      - name: install_rust
        uses: actions-rs/toolchain@v1
        with:
          toolchain: ${{ matrix.rust }}
          override: true
          profile: minimal

      - name: fetch
        run: cargo fetch --verbose

      - name: build
        run: cargo build --verbose

      - name: test_all_features
        run: cargo test --verbose