logcall 0.1.13

An attribute macro that logs the function return value.
Documentation
name: Rust

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

env:
  CARGO_TERM_COLOR: always

jobs:
  check:
    runs-on: ubuntu-22.04
    steps:
    - uses: actions/checkout@v4
    - name: Install toolchain
      uses: dtolnay/rust-toolchain@nightly
      with:
        components: rustfmt,clippy
    - uses: Swatinem/rust-cache@v2
    - name: Check clippy
      run: cargo +nightly clippy --all-targets --all-features -- -D warnings
    - name: Check format
      run: cargo +nightly fmt --all -- --check

  test:
    strategy:
      matrix:
        rust-version: [ "1.80.0", "stable" ]
    runs-on: ubuntu-22.04
    steps:
      - uses: actions/checkout@v4
      - uses: Swatinem/rust-cache@v2
      - name: Delete rust-toolchain.toml
        run: rm rust-toolchain.toml
      - name: Install toolchain
        uses: dtolnay/rust-toolchain@master
        with:
          toolchain: ${{ matrix.rust-version }}
      - name: Build
        run: cargo build --all-features --tests --examples --lib
      - name: Run unit tests
        run: cargo test --all-features -- --nocapture
      - name: Run examples
        run: cargo run --example main

  required:
    name: Required
    runs-on: ubuntu-22.04
    if: ${{ always() }}
    needs:
      - check
      - test
    steps:
      - name: Guardian
        run: |
          if [[ ! ( \
                 "${{ needs.check.result }}" == "success" \
              && "${{ needs.test.result }}" == "success" \
              ) ]]; then
            echo "Required jobs haven't been completed successfully."
            exit -1
          fi