Add collimate algorithm and Otsu improvements to OCR stitch block #2809
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: UNIT TESTS - inference-models | |
| permissions: | |
| contents: read | |
| on: | |
| pull_request: | |
| branches: [main] | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| jobs: | |
| unit-tests-inference-models: | |
| runs-on: | |
| labels: depot-ubuntu-22.04-4 | |
| group: public-depot | |
| timeout-minutes: 10 | |
| strategy: | |
| matrix: | |
| python-version: ["3.9", "3.10", "3.11", "3.12"] | |
| steps: | |
| - name: 🛎️ Checkout | |
| uses: actions/checkout@v4 | |
| - name: 📦 Cache Python packages | |
| uses: actions/cache@v3 | |
| with: | |
| path: ~/.cache/uv | |
| key: ${{ runner.os }}-uv-${{ matrix.python-version }}-${{ hashFiles('inference_models/pyproject.toml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-uv-${{ matrix.python-version }}- | |
| - name: 🐍 Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| check-latest: true | |
| - name: 📦 Install dependencies | |
| working-directory: inference_models | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install uv | |
| python -m uv venv | |
| python -m uv pip install -e .[test] --python .venv | |
| - name: 🧪 Unit Tests | |
| timeout-minutes: 30 | |
| working-directory: inference_models | |
| run: | | |
| source .venv/bin/activate | |
| python -m pytest -n auto tests/unit_tests |