Repository navigation
fix(tts): prevent KeyError for non-timestamp messages in speech parts #544
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 | |
| on: | |
| push: | |
| branches: | |
| - 'main' | |
| pull_request: | |
| branches: | |
| - 'main' | |
| jobs: | |
| current: | |
| if: ${{ !(github.event_name == 'pull_request' && startsWith(github.event.pull_request.title, 'docs:')) }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| # ubuntu-latest (26.04) ships no CPython 3.9 build, so pin the | |
| # still-supported 3.9 leg to 24.04 and keep the rest on latest. | |
| include: | |
| - os: ubuntu-24.04 | |
| python-version: '3.9' | |
| - os: ubuntu-latest | |
| python-version: '3.10' | |
| - os: ubuntu-latest | |
| python-version: '3.11' | |
| - os: ubuntu-latest | |
| python-version: '3.12' | |
| - os: ubuntu-latest | |
| python-version: '3.13' | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Cache pip dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/pip | |
| key: ${{ runner.os }}-pip-${{ hashFiles('**/pyproject.toml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pip- | |
| - name: Update setuptools | |
| run: | | |
| pip install --upgrade pip | |
| pip install setuptools==68.2.2 wheel==0.41.2 | |
| - name: Set PYTHONPATH | |
| run: | | |
| echo "PYTHONPATH=$PYTHONPATH:${{ github.workspace }}/src" >> $GITHUB_ENV | |
| - name: Install dependencies | |
| run: | | |
| export PIP_DEFAULT_TIMEOUT=300 | |
| pip install -r requirements.txt | |
| pip install -r requirements-test.txt | |
| - name: Show installed pip packages (versions) | |
| run: | | |
| python -m pip list --format=columns | |
| - name: Run current tests with coverage | |
| run: | | |
| coverage run -m pytest tests --ignore=tests/legacy_1x | |
| - name: Generate coverage report | |
| run: | | |
| coverage report -m | |
| legacy: | |
| if: ${{ !(github.event_name == 'pull_request' && startsWith(github.event.pull_request.title, 'docs:')) }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| # ubuntu-latest (26.04) ships no CPython 3.9 build, so pin the | |
| # still-supported 3.9 leg to 24.04 and keep the rest on latest. | |
| include: | |
| - os: ubuntu-24.04 | |
| python-version: '3.9' | |
| - os: ubuntu-latest | |
| python-version: '3.10' | |
| - os: ubuntu-latest | |
| python-version: '3.11' | |
| - os: ubuntu-latest | |
| python-version: '3.12' | |
| - os: ubuntu-latest | |
| python-version: '3.13' | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Cache pip dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/pip | |
| key: ${{ runner.os }}-pip-${{ hashFiles('**/pyproject.toml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pip- | |
| - name: Update setuptools | |
| run: | | |
| pip install --upgrade pip | |
| pip install setuptools==68.2.2 wheel==0.41.2 | |
| - name: Set PYTHONPATH | |
| run: | | |
| echo "PYTHONPATH=$PYTHONPATH:${{ github.workspace }}/src" >> $GITHUB_ENV | |
| - name: Install dependencies | |
| run: | | |
| export PIP_DEFAULT_TIMEOUT=300 | |
| pip install -r requirements.txt | |
| pip install -r requirements-test.txt | |
| - name: Run archived legacy tests | |
| run: | | |
| python -m pytest tests/legacy_1x |