if-none 0.0.5

Early break/continue/return if an optional expression evaluates to `None`.
Documentation
# SPDX-FileCopyrightText: The if-none authors
# SPDX-License-Identifier: CC0-1.0

# yaml-language-server: $schema=https://json.schemastore.org/github-workflow

name: continuous-integration

permissions:
  contents: read

on:
  pull_request:
  push:
    branches:
      - main

env:
  CARGO_INCREMENTAL: 0
  CARGO_TERM_COLOR: always
  RUST_BACKTRACE: short

jobs:
  continuous-integration:
    name: Building project and running tests
    runs-on: ubuntu-latest

    steps:
      - name: Install Rust toolchain
        uses: actions-rs/toolchain@v1
        with:
          toolchain: stable
          profile: minimal

      - name: Check out repository
        uses: actions/checkout@v3

      - name: Cache Rust toolchain and build artifacts
        uses: Swatinem/rust-cache@v2

      - name: Generate Cargo.lock
        uses: actions-rs/cargo@v1
        with:
          command: generate-lockfile

      - name: Build tests
        uses: actions-rs/cargo@v1
        with:
          command: test
          args: --locked --all-targets --no-run

      - name: Run tests
        uses: actions-rs/cargo@v1
        with:
          command: test
          args: --locked --all-targets -- --nocapture --quiet