Skip to content

Add searchable label type widget #84

Add searchable label type widget

Add searchable label type widget #84

Workflow file for this run

name: tests
on:
push:
branches: main
pull_request:
branches: main
jobs:
pytest-common:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python: ["3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
# MacOS issue ref.: https://github.com/actions/setup-python/issues/855 & https://github.com/actions/setup-python/issues/865
python-version: ${{ matrix.os == 'macos-latest' && matrix.python == '3.10' && '3.11' || matrix.python }}
architecture: x64
# MacOS: use crnn_vgg16_bn as recognition architecture to avoid onnxruntime error
- name: Set recognition arch for macOS
if: matrix.os == 'macos-latest'
run: echo "RECOGNITION_ARCH=crnn_vgg16_bn" >> $GITHUB_ENV
- name: Cache python modules
uses: actions/cache@v5
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pkg-deps-${{ matrix.python }}-${{ hashFiles('pyproject.toml') }}-tests
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .[dev] --upgrade
- name: Run unittests
run: |
coverage run -m pytest tests/common/ -rs
coverage xml -o coverage-common-${{ matrix.os }}-${{ matrix.python }}.xml
- uses: actions/upload-artifact@v7
with:
name: coverage-common-${{ matrix.os }}-${{ matrix.python }}
path: ./coverage-common-${{ matrix.os }}-${{ matrix.python }}.xml
if-no-files-found: error
codecov-upload:
runs-on: ubuntu-latest
needs: [ pytest-common ]
steps:
- uses: actions/checkout@v6
- uses: actions/download-artifact@v8
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
flags: unittests
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}