Files
pyannote-audio/.github/workflows/test.yml
T
ea18bc70d8 Align audio CI and releases; require Python 3.11 (#2081)
* feat(cli): add --subfolder option to benchmark command (#2063)
* fix(utils): fix `SpeakerDiarizationMixin.optimal_mapping` when `reference` is a mapping
* fix(task): fix `balance` option crashing training with `KeyError: 'metadata'` (#2067)
* fix(io): fix `Audio.crop` raising when an in-memory waveform is cropped up to its very end (#2068)
* fix(model): make Model.default_activation return identity for unsupported tasks
* fix: compute sample duration from preloaded waveform
* fix(pipeline): omit unset runtime options from model references (#2080)

Co-authored-by: abeeranajam31 <128603901+abeeranajam31@users.noreply.github.com>
Co-authored-by: antoinelaurent <antoinelaurent@me.com>
Co-authored-by: Kayvan Zahiri <123409429+Kayvan-Zahiri@users.noreply.github.com>
Co-authored-by: Mohammad Hijjawi <51020382+MohammadHijjawi97@users.noreply.github.com>
2026-10-22 15:07:01 +02:00

106 lines
4.0 KiB
YAML

name: Test
on:
workflow_call:
permissions:
contents: read
jobs:
test:
name: Test Python ${{ matrix.python-version }}
runs-on: ubuntu-latest
env:
PYANNOTE_METRICS_ENABLED: "0"
HF_HUB_DISABLE_TELEMETRY: "1"
HF_HUB_OFFLINE: "1"
OMP_NUM_THREADS: "2"
strategy:
fail-fast: false
matrix:
python-version: ["3.11", "3.12", "3.13", "3.14"]
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
- id: python
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
with:
python-version: ${{ matrix.python-version }}
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: python-package-distributions
path: dist/
- name: Install FFmpeg
# TorchCodec needs FFmpeg's shared libraries, but not recommended extras.
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends ffmpeg
- name: Install the built wheel with test dependencies
run: |
uv venv --python "${{ steps.python.outputs.python-path }}"
uv pip install --torch-backend cpu "$(echo dist/*.whl)[test,cli]"
- name: Run tests against the installed wheel
run: uv run --no-project --python .venv/bin/python python -m pytest tests -m "not network and not notebook"
integration:
name: Public model integration (Python 3.11)
runs-on: ubuntu-latest
env:
PYANNOTE_METRICS_ENABLED: "0"
HF_HUB_DISABLE_TELEMETRY: "1"
OMP_NUM_THREADS: "2"
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
- id: python
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
with:
python-version: "3.11"
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: python-package-distributions
path: dist/
- name: Install FFmpeg
# TorchCodec needs FFmpeg's shared libraries, but not recommended extras.
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends ffmpeg
- name: Install the built wheel with test dependencies
run: |
uv venv --python "${{ steps.python.outputs.python-path }}"
uv pip install --torch-backend cpu "$(echo dist/*.whl)[test,cli]"
- name: Run tests against the installed wheel
run: uv run --no-project --python .venv/bin/python python -m pytest tests -m network
separation:
name: Optional separation (Python 3.11)
runs-on: ubuntu-latest
env:
PYANNOTE_METRICS_ENABLED: "0"
HF_HUB_DISABLE_TELEMETRY: "1"
HF_HUB_OFFLINE: "1"
OMP_NUM_THREADS: "2"
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
- id: python
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
with:
python-version: "3.11"
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: python-package-distributions
path: dist/
- name: Install the built wheel with test dependencies
run: |
uv venv --python "${{ steps.python.outputs.python-path }}"
uv pip install --torch-backend cpu "$(echo dist/*.whl)[test,cli,separation]"
- name: Run tests against the installed wheel
run: uv run --no-project --python .venv/bin/python python -m pytest tests/test_separation.py