expy 0.0.2

Embeddable & extensible expression evaluator
Documentation
# Based on https://github.com/jprochazk/garde/blob/main/.github/workflows/ci.yml
# and https://ectobit.com/blog/speed-up-github-actions-rust-pipelines/

name: ci
on:
  pull_request:
  push:
    branches:
    - master
  workflow_dispatch:

permissions:
  contents: read


jobs:

  check:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout source code
        uses: actions/checkout@v3
      - name: Install Rust
        uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: nightly
          override: true
          components: clippy
      - name: Set up Cargo cache
        uses: actions/cache@v3
        continue-on-error: false
        with:
          path: |
            ~/.cargo/bin/
            ~/.cargo/registry/index/
            ~/.cargo/registry/cache/
            ~/.cargo/git/db/
            target/
          key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
          restore-keys: ${{ runner.os }}-cargo-
      - name: Install extra linters
        run: |
          cargo install cargo-deny
      - name: Run Clippy
        run: cargo clippy --all-features -- -D warnings
      - name: Run cargo-deny
        run: cargo deny check all
      # TODO: cargo-outdated?

  test:
    name: Test
    strategy:
      fail-fast: false
      matrix:
        build: [pinned, stable, nightly]
        include:
        - build: pinned
          os: ubuntu-latest
          rust: 1.65
        - build: stable
          os: ubuntu-latest
          rust: stable
        - build: nightly
          os: ubuntu-latest
          rust: nightly
    runs-on: ${{ matrix.os }}
    env:
      CARGO_TERM_COLOR: always
    steps:
      - name: Checkout source code
        uses: actions/checkout@v3
      - name: Install Rust
        uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: ${{ matrix.rust }}
          override: true
      - name: Set up Cargo cache
        uses: actions/cache@v3
        continue-on-error: false
        with:
          path: |
            ~/.cargo/bin/
            ~/.cargo/registry/index/
            ~/.cargo/registry/cache/
            ~/.cargo/git/db/
            target/
          key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
          restore-keys: ${{ runner.os }}-cargo-
      - name: Test (default features)
        run: cargo test
      - name: Test (all features)
        run: cargo test --all-features