diff --git a/.github/workflows/unittests.yml b/.github/workflows/unittests.yml index 0ce114fc..dc46951b 100644 --- a/.github/workflows/unittests.yml +++ b/.github/workflows/unittests.yml @@ -13,13 +13,13 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest] - python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] - include: - - os: macos-latest - python-version: "3.13" - - os: windows-latest - python-version: "3.12" # Python 3.13 fails on Windows + os: [ubuntu-latest] + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] + include: + - os: macos-latest + python-version: "3.13" + - os: windows-latest + python-version: "3.13" runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 @@ -36,25 +36,19 @@ jobs: - name: Install ffmpeg (for Whisper) if: runner.os != 'macOS' uses: FedericoCarboni/setup-ffmpeg@v3 - - name: Install standard-aifc on Python 3.13 - if: matrix.python-version == '3.13' + - name: Install ffmpeg and portaudio on macOS + if: runner.os == 'macOS' run: | - python -m pip install standard-aifc - - name: Install Python dependencies (Ubuntu, <=3.12) + brew instell ffmpeg portaudio + python -m pip install --no-build-isolation .[dev,audio,pocketsphinx,openai,groq] + - name: Install Python dependencies (Ubuntu, Python <= 3.12) if: runner.os == 'Linux' && matrix.python-version != '3.13' run: | python -m pip install .[dev,audio,pocketsphinx,whisper-local,openai,groq] - - name: Install Python dependencies (Ubuntu, 3.13) + - name: Install Python dependencies (Linux, Python 3.13) if: runner.os == 'Linux' && matrix.python-version == '3.13' run: | - python -m pip install setuptools python -m pip install --no-build-isolation .[dev,audio,pocketsphinx,openai,groq] - - name: Install Python dependencies (macOS) - if: runner.os == 'macOS' - run: | - brew install portaudio - python -m pip install setuptools - python -m pip install --no-build-isolation .[dev,audio,openai,groq] - name: Install Python dependencies (Windows) if: runner.os == 'Windows' run: | diff --git a/tests/test_special_features.py b/tests/test_special_features.py index 37dac290..9dd2574e 100644 --- a/tests/test_special_features.py +++ b/tests/test_special_features.py @@ -13,7 +13,7 @@ def setUp(self): self.AUDIO_FILE_EN = os.path.join(os.path.dirname(os.path.realpath(__file__)), "english.wav") self.addTypeEqualityFunc(str, self.assertSameWords) - @unittest.skipIf(sys.platform.startswith(("darwin", "win")), "skip on macOS and Windows") + @unittest.skipIf(sys.platform.startswith("win"), "skip on Windows") def test_sphinx_keywords(self): r = sr.Recognizer() with sr.AudioFile(self.AUDIO_FILE_EN) as source: audio = r.record(source)