Repository navigation
141 lines (116 loc) · 4.24 KB
/
Copy pathci.yml
File metadata and controls
141 lines (116 loc) · 4.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lint:
name: Lint and lockfile
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
submodules: recursive
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
with:
python-version: "3.12"
- name: Install ruff
run: pip install "ruff==0.16.*"
- name: Run ruff check
run: ruff check .
- name: Verify uv lockfile
run: |
pip install "uv==0.10.*"
uv lock --check
package:
name: Build package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
with:
python-version: "3.12"
- name: Build and inspect distributions
run: |
pip install build twine
python -m build
twine check dist/*
import-check:
name: Import on Python ${{ matrix.python-version }}
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
with:
python-version: ${{ matrix.python-version }}
- name: Install package
run: pip install -e .
- name: Verify imports
run: python -c "from whisperlivekit import TranscriptionEngine, AudioProcessor, TestHarness, TestState, transcribe_audio; print('All imports OK')"
diart-import:
name: Diart dependency compatibility
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
submodules: recursive
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
with:
python-version: "3.12"
- name: Verify Diart imports with matching Torch versions
run: |
pip install "uv==0.10.*"
uv run --isolated --locked --no-dev --extra diarization-diart python - <<'PY'
import diart
import torch
import torchaudio
import torchvision
torch_version = torch.__version__.split("+", 1)[0]
torchaudio_version = torchaudio.__version__.split("+", 1)[0]
assert torch_version.split(".")[:2] == torchaudio_version.split(".")[:2], (
f"Torch {torch_version} and Torchaudio {torchaudio_version} must share major.minor"
)
print(
f"Diart imports OK with Torch {torch_version}, "
f"Torchaudio {torchaudio_version}, and Torchvision {torchvision.__version__}"
)
PY
test:
# Required status-check name in the main branch ruleset.
name: Unit tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
with:
python-version: "3.12"
cache: pip
- name: Install package with test deps
run: pip install -e ".[test]" qwen3-asr-causal
- name: Install FFmpeg for audio integration tests
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends ffmpeg
- name: Run regression suite
run: pytest -q tests/ --ignore=tests/test_pipeline.py --ignore=tests/test_asr_coalescing_pipeline.py
# Keep real-audio coverage visible: this step downloads Whisper tiny
# and LibriSpeech audio and feeds it at real-time speed.
- name: Verify Whisper streaming boundaries with real audio
run: pytest -q tests/test_asr_coalescing_pipeline.py