fix(app): route the iOS share hand-off instead of Unmatched Route #136
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: Python Tests | |
| on: | |
| pull_request: | |
| paths: | |
| - "*.py" | |
| - "setup-requirements.txt" | |
| - ".coveragerc" | |
| - "tests/unit/**" | |
| - "extras/chronicle-setup/**" | |
| - "extras/chronicle-client/**" | |
| - "backends/advanced/src/**" | |
| - "backends/advanced/tests/**" | |
| - "backends/advanced/pyproject.toml" | |
| - "backends/advanced/uv.lock" | |
| - "extras/asr-services/common/**" | |
| - "extras/asr-services/providers/**" | |
| - "extras/asr-services/tests/**" | |
| - "extras/asr-services/pyproject.toml" | |
| - "extras/asr-services/uv.lock" | |
| - ".github/workflows/python-tests.yml" | |
| push: | |
| branches: [dev, main] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| root-unit: | |
| name: Root tooling unit tests | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| env: | |
| # services.py and status.py live at the repo root, so tests/unit needs the | |
| # workspace itself importable, not just the backend package. | |
| PYTHONPATH: ${{ github.workspace }}/backends/advanced/src:${{ github.workspace }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v4 | |
| with: | |
| version: "latest" | |
| - name: Run unit tests with coverage | |
| run: >- | |
| uv run | |
| --with-requirements setup-requirements.txt | |
| --with pytest | |
| --with pytest-cov | |
| pytest tests/unit | |
| --cov | |
| --cov-config=.coveragerc | |
| --cov-report=term-missing | |
| --cov-report=xml | |
| --cov-report=html | |
| - name: Upload coverage report | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: root-unit-coverage | |
| path: coverage-reports/ | |
| if-no-files-found: warn | |
| retention-days: 14 | |
| client-packages: | |
| name: Shared client/setup package tests | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v4 | |
| with: | |
| version: "latest" | |
| # Both packages locate the checkout by searching for marker files, so their | |
| # tests must run against a real one — hence no working-directory override. | |
| - name: chronicle-setup | |
| run: >- | |
| uv run --no-project | |
| --with ./extras/chronicle-setup | |
| --with pytest | |
| pytest extras/chronicle-setup/tests -q | |
| - name: chronicle-client | |
| run: >- | |
| uv run --no-project | |
| --with ./extras/chronicle-client | |
| --with pytest | |
| pytest extras/chronicle-client/tests -q | |
| advanced-backend-unit: | |
| name: Advanced backend unit tests | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| defaults: | |
| run: | |
| working-directory: backends/advanced | |
| services: | |
| # Some backend tests hit real local services (vault locks are Redis-backed | |
| # and fail closed; the audio-chunk and silence-trim tests assert on real | |
| # Mongo documents). Match the defaults the code assumes: | |
| # redis://localhost:6379, mongodb://localhost:27018. Without them those | |
| # modules skip themselves rather than failing — see tests/conftest.py. | |
| redis: | |
| image: redis:7-alpine | |
| ports: | |
| - 6379:6379 | |
| mongo: | |
| image: mongo:8 | |
| ports: | |
| - 27018:27017 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v4 | |
| with: | |
| version: "latest" | |
| - name: Install system dependencies | |
| # libopus0: native library behind opuslib (services/device_audio.py), | |
| # imported transitively during test collection. | |
| # ffmpeg: the audio-persistence tests shell out to the binary to convert | |
| # and reconstruct WAV/Opus chunks. | |
| run: sudo apt-get update && sudo apt-get install -y --no-install-recommends libopus0 ffmpeg | |
| - name: Install test dependencies | |
| run: uv sync --locked --group test | |
| - name: Run unit tests with coverage | |
| run: >- | |
| uv run --group test pytest | |
| --cov=advanced_omi_backend | |
| --cov-report=term-missing | |
| --cov-report=xml | |
| --cov-report=html | |
| - name: Upload coverage report | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: advanced-backend-unit-coverage | |
| path: backends/advanced/coverage-reports/ | |
| if-no-files-found: warn | |
| retention-days: 14 | |
| asr-unit: | |
| name: ASR unit tests | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| defaults: | |
| run: | |
| working-directory: extras/asr-services | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v4 | |
| with: | |
| version: "latest" | |
| - name: Install test dependencies | |
| run: uv sync --locked --group test | |
| - name: Run unit tests with coverage | |
| run: >- | |
| uv run --group test pytest | |
| --ignore=tests/test_parakeet_service.py | |
| --cov=common | |
| --cov=providers | |
| --cov-report=term-missing | |
| --cov-report=xml | |
| --cov-report=html | |
| - name: Upload coverage report | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: asr-unit-coverage | |
| path: extras/asr-services/coverage-reports/ | |
| if-no-files-found: warn | |
| retention-days: 14 |