reval 0.5.0

Simple Rust expression evaluator
Documentation
name: Build

on:
  push:
  pull_request:

env:
  CARGO_TERM_COLOR: always

jobs:
  rustfmt:
    name: Rust fmt
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: stable
          override: true
      - run: rustup component add rustfmt
      - uses: actions-rs/cargo@v1
        with:
          command: fmt
          args: --all -- --check

  check:
    name: A quick check for warnings
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: stable
          override: true
      - name: set rust options to fail on warnings
        run: echo "RUSTFLAGS=-D warnings" >> $GITHUB_ENV
      - uses: actions-rs/cargo@v1
        with:
          command: check
          args: --all-features

  clippy:
    name: Run clippy
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: stable
          override: true
      - name: set rust options to fail on warnings
        run: echo "RUSTFLAGS=-D warnings" >> $GITHUB_ENV
      - uses: actions-rs/cargo@v1
        with:
          command: clippy
          args: --all-features

  test:
    name: Test
    runs-on: ubuntu-latest
    strategy:
      matrix:
        rust:
          - stable
          - beta
          - "1.62.1"
    steps:
      - uses: actions/checkout@v3
      - uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: ${{ matrix.rust }}
          override: true
      - uses: actions-rs/cargo@v1
        with:
          command: test
          args: --all-features