-
Notifications
You must be signed in to change notification settings - Fork 1
56 lines (46 loc) · 1.9 KB
/
Copy pathci.yml
File metadata and controls
56 lines (46 loc) · 1.9 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
name: ci
on:
push:
branches: [main]
pull_request:
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
# Windows is where the tool is developed and Linux is where most people
# will run it, so both gate the build. macOS is untested territory and
# is not claimed here.
os: [ubuntu-latest, windows-latest]
python-version: ["3.11", "3.12"]
steps:
- uses: actions/checkout@v5
- name: Install ffmpeg (Linux)
if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install -y ffmpeg libportaudio2
- name: Install ffmpeg (Windows)
if: runner.os == 'Windows'
run: choco install ffmpeg -y --no-progress
- uses: astral-sh/setup-uv@v6
# A virtualenv, not `--system`. Two reasons, both of which bit on the
# first run this workflow ever did: Ubuntu's Python is externally managed
# and refuses a system install outright, and `--system` ignores the
# matrix entirely — every job installed into whatever Python the runner
# happened to ship, so the "3.11" job reported "Using Python 3.12.3" and
# neither version was actually being tested.
- name: Install
run: |
uv venv --python ${{ matrix.python-version }}
uv pip install -e ".[dev]"
# `uv run` picks up the .venv above on both Windows and Linux without
# anyone having to activate it.
- name: Check the version under test
run: uv run python -c "import sys; print(sys.version)"
- name: Lint
run: uv run ruff check src tests examples
# No test here touches the network or an audio device; the suite covers
# chunk planning, echo suppression, parsing, storage and the no-egress
# check. Anything that needs the API is run by hand against the real endpoint.
- name: Test
run: uv run pytest -q