Skip to content

Commit

Permalink
Test playback
Browse files Browse the repository at this point in the history
  • Loading branch information
gregorybchris committed Apr 18, 2024
1 parent 6b02c40 commit 484c0b5
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 2 deletions.
46 changes: 44 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,18 @@ jobs:
build-service:
runs-on: ubuntu-latest

strategy:
matrix:
python-version:
- "3.10"

steps:
- uses: actions/checkout@v2

- name: Python 3.10 Setup
- name: Python ${{ matrix.python-version }} Setup
uses: actions/setup-python@v2
with:
python-version: "3.10"
python-version: ${{ matrix.python-version }}

- name: Install Python dependencies
shell: bash
Expand Down Expand Up @@ -124,3 +129,40 @@ jobs:
shell: bash
run: |
poetry run covcheck coverage.xml --config pyproject.toml --group service
build-playback:
runs-on: ubuntu-latest

strategy:
matrix:
python-version:
- "3.10"

steps:
- uses: actions/checkout@v2

- name: Python ${{ matrix.python-version }} Setup
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install system dependencies
shell: bash
run: |
sudo apt-get --yes update
sudo apt-get --yes install libasound2-dev libportaudio2
- name: Install Python dependencies
shell: bash
run: |
pip install poetry
if [ -d /poetryenvs ]; then rm -rf ~/poetryenvs; fi
poetry config virtualenvs.path ~/poetryenvs
poetry install -E playback
- name: Run pytest
shell: bash
env:
HUME_DEV_API_KEY: ${{ secrets.HUME_DEV_API_KEY }}
run: |
poetry run pytest tests --cov=hume --cov-report=html --cov-report=xml --cov-branch -m playback
17 changes: 17 additions & 0 deletions tests/voice/test_microphone.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import logging

import pytest

from hume._voice.microphone.microphone import Microphone

logger = logging.getLogger(__name__)


@pytest.mark.asyncio
@pytest.mark.voice
@pytest.mark.playback
class TestMicrophone:

async def test_create_microphone(self) -> None:
with Microphone.context():
pass

0 comments on commit 484c0b5

Please sign in to comment.