oar-ocr 0.6.3

An Optical Character Recognition (OCR) and Document Layout Analysis library written in Rust.
Documentation
name: Run Tests

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

env:
  CARGO_TERM_COLOR: always

jobs:
  test:
    name: Test (${{ matrix.os }})
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        include:
          - os: ubuntu-latest
            clippy-features: ""
          - os: macos-latest
            clippy-features: "--features metal"
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4

      - name: Install Rust toolchain
        uses: dtolnay/rust-toolchain@stable
        with:
          # Install components needed for linting and formatting
          components: rustfmt, clippy

      - name: Cache Cargo dependencies
        # Use a dedicated action for caching Rust projects
        uses: Swatinem/rust-cache@v2

      - name: Check formatting
        run: cargo fmt --all -- --check

      - name: Run Clippy linter
        # Run clippy on all workspace members with warnings-as-errors
        run: |
          cargo clippy --all-targets --all -- -D warnings
          cargo clippy --all-targets -p oar-ocr-vl ${{ matrix.clippy-features }} -- -D warnings

      - name: Run tests in debug mode
        run: cargo test --verbose --all